aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/xep/0045_muc
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2022-02-02 21:37:05 +0100
committerfiaxh <git@lightrise.org>2022-02-07 01:21:11 +0100
commit4ef50db3e581016365087759d5af8649e37ab8a7 (patch)
treeec7d47401f8424b5b9999941e05f61409594c539 /xmpp-vala/src/module/xep/0045_muc
parent5ed8d28a27948ed949eb80b0da06d2c4ec9571ff (diff)
downloaddino-4ef50db3e581016365087759d5af8649e37ab8a7.tar.gz
dino-4ef50db3e581016365087759d5af8649e37ab8a7.zip
Various call UI/UX improvements
Diffstat (limited to 'xmpp-vala/src/module/xep/0045_muc')
-rw-r--r--xmpp-vala/src/module/xep/0045_muc/module.vala5
1 files changed, 4 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 e8711742..9969f507 100644
--- a/xmpp-vala/src/module/xep/0045_muc/module.vala
+++ b/xmpp-vala/src/module/xep/0045_muc/module.vala
@@ -218,7 +218,10 @@ public class Module : XmppStreamModule {
public async void change_affiliation(XmppStream stream, Jid muc_jid, Jid? user_jid, string? nick, string new_affiliation) {
StanzaNode item_node = new StanzaNode.build("item", NS_URI_ADMIN)
.put_attribute("affiliation", new_affiliation, NS_URI_ADMIN);
- if (user_jid != null) item_node.put_attribute("jid", user_jid.to_string(), NS_URI_ADMIN);
+ if (user_jid != null) {
+ // Some servers don't allow full JIDs and reply error:modify - jid-malformed - "Bare JID expected, got full JID". Make them bare JIDs.
+ item_node.put_attribute("jid", user_jid.bare_jid.to_string(), NS_URI_ADMIN);
+ }
if (nick != null) item_node.put_attribute("nick", nick, NS_URI_ADMIN);
StanzaNode query = new StanzaNode.build("query", NS_URI_ADMIN).add_self_xmlns().put_node(item_node);