Philipp Hörist pushed to branch master at gajim / gajim
Commits:
2 changed files:
Changes:
| ... | ... | @@ -651,6 +651,11 @@ def is_irc(self) -> bool: |
| 651 | 651 | return False
|
| 652 | 652 | return disco_info.is_irc
|
| 653 | 653 | |
| 654 | + def get_config_value(self, field_name: str) -> Any:
|
|
| 655 | + disco_info = self.get_disco()
|
|
| 656 | + assert disco_info is not None
|
|
| 657 | + return disco_info.get_field_value(Namespace.MUC_INFO, field_name)
|
|
| 658 | + |
|
| 654 | 659 | def add_resource(self, resource: str) -> GroupchatParticipant:
|
| 655 | 660 | assert resource is not None
|
| 656 | 661 | # Check if resource is not None because not the whole
|
| ... | ... | @@ -195,6 +195,15 @@ def _process_update(self, |
| 195 | 195 | def _muc_update_received(self, properties: PresenceProperties) -> None:
|
| 196 | 196 | contact = self._con.get_module('Contacts').get_contact(properties.jid,
|
| 197 | 197 | groupchat=True)
|
| 198 | + assert isinstance(contact, GroupchatParticipant)
|
|
| 199 | + |
|
| 200 | + # Custom ejabberd room config option
|
|
| 201 | + allow_query = contact.room.get_config_value('allow_query_users')
|
|
| 202 | + if allow_query is False:
|
|
| 203 | + self._log.debug('Room does not allow IQ queries: %s',
|
|
| 204 | + contact.room.jid)
|
|
| 205 | + return
|
|
| 206 | + |
|
| 198 | 207 | nick = properties.jid.resource
|
| 199 | 208 | |
| 200 | 209 | if properties.avatar_state == AvatarState.EMPTY:
|