diff options
| author | kousu <nick@kousu.ca> | 2026-02-22 17:17:22 -0500 |
|---|---|---|
| committer | fiaxh <fiaxh@users.noreply.github.com> | 2026-03-27 19:41:58 +0100 |
| commit | fe2cfd1f24cfbc65362e5094f3aeab0c6279145c (patch) | |
| tree | 4b07a9bf696b5ecfc33650f3cdeb750cb7a77dbf /xmpp-vala/src/module/xep/0045_muc/module.vala | |
| parent | 0b92ee2a113ca8da2d3a4d4b06056f291738b5fe (diff) | |
muc: only do disco on succesfully entering a room
Sending a disco#info <iq> on being banned from a room is wasteful, and
when _creating_ a room dino asks too soon, receives an error, and gives
up on syncing the room metadata giving subtle, hair-tearing inconsistencies
because flag.has_room_features() returns false for everything.
It's barely noticeable, because if you're banned from a room you
can't query it anyway (though in that case it's still a wasted <iq>),
and if you're creating the room all its fields are empty by default.
I noticed this because I'm experimenting with https://modules.prosody.im/mod_muc_defaults;
dino incorrectly shows moderation off when it should be on in newly
created rooms.
Diffstat (limited to 'xmpp-vala/src/module/xep/0045_muc/module.vala')
| -rw-r--r-- | xmpp-vala/src/module/xep/0045_muc/module.vala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xmpp-vala/src/module/xep/0045_muc/module.vala b/xmpp-vala/src/module/xep/0045_muc/module.vala index fdabc8cb..f660a1cc 100644 --- a/xmpp-vala/src/module/xep/0045_muc/module.vala +++ b/xmpp-vala/src/module/xep/0045_muc/module.vala @@ -113,7 +113,6 @@ public class Module : XmppStreamModule { stream.get_flag(Flag.IDENTITY).start_muc_enter(bare_jid, presence.id); - query_room_info.begin(stream, bare_jid); stream.get_module(Presence.Module.IDENTITY).send_presence(stream, presence); var promise = new Promise<JoinResult?>(); @@ -359,6 +358,8 @@ public class Module : XmppStreamModule { Jid bare_jid = presence.from.bare_jid; if (flag.get_enter_id(bare_jid) != null) { + query_room_info.begin(stream, bare_jid); + // TODO only query that if we actually have the rights to query_affiliation.begin(stream, bare_jid, "member"); query_affiliation.begin(stream, bare_jid, "admin"); |
