Philipp Hörist pushed to branch master at gajim / gajim
Commits:
c74d8f0e by lovetox at 2022-09-02T22:23:58+02:00
fix: MUC: Improve automatically adding members on invite
Gajims private definition of a group chat means also it must be non-anonymous.
This make not much sense for the invite logic, here it should only matter
if the room is members-only or not.
- - - - -
1 changed file:
- gajim/common/modules/muc.py
Changes:
=====================================
gajim/common/modules/muc.py
=====================================
@@ -984,10 +984,15 @@ def invite(self,
reason: Optional[str] = None,
continue_: bool = False
) -> str:
- if helpers.get_muc_context(room) == 'private':
- room_contact = self._get_contact(room)
- assert isinstance(room_contact, GroupchatContact)
+
+ room_contact = self._get_contact(room, groupchat=True)
+ assert isinstance(room_contact, GroupchatContact)
+ disco = room_contact.get_disco()
+ assert disco is not None
+
+ if disco.muc_is_members_only:
self_contact = room_contact.get_self()
+ assert self_contact is not None
affiliation = self_contact.affiliation
admin = affiliation.is_owner or affiliation.is_admin
if admin:
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/c74d8f0e2c916dc7117c65e097569de003053d9d
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/c74d8f0e2c916dc7117c65e097569de003053d9d
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits