diff options
| author | Marvin W <git@larma.de> | 2026-05-30 16:10:36 +0200 |
|---|---|---|
| committer | Marvin W <git@larma.de> | 2026-06-07 23:13:07 +0200 |
| commit | 158cff3098e9370696f9250a199c78e4f2d18ce0 (patch) | |
| tree | bd05a55e5419ef2307c7a7f4d7665f7449c8e8b1 /xmpp-vala/src/module/xep/0045_muc | |
| parent | afcf44928748f7ac049f1ba9f5c51c6dedbf4ec2 (diff) | |
Add JID interning
Diffstat (limited to 'xmpp-vala/src/module/xep/0045_muc')
| -rw-r--r-- | xmpp-vala/src/module/xep/0045_muc/module.vala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xmpp-vala/src/module/xep/0045_muc/module.vala b/xmpp-vala/src/module/xep/0045_muc/module.vala index bdaabb3e..ad929b00 100644 --- a/xmpp-vala/src/module/xep/0045_muc/module.vala +++ b/xmpp-vala/src/module/xep/0045_muc/module.vala @@ -377,7 +377,7 @@ public class Module : XmppStreamModule { string? jid_ = x_node.get_deep_attribute("item", "jid"); if (jid_ != null) { try { - Jid real_jid = new Jid(jid_); + Jid real_jid = Jid.from_string(jid_); flag.set_real_jid(presence.from, real_jid); if (affiliation != null) { stream.get_flag(Flag.IDENTITY).set_offline_member(presence.from, real_jid, affiliation); @@ -496,7 +496,7 @@ public class Module : XmppStreamModule { string? affiliation_ = item.get_attribute("affiliation"); if (jid__ != null && affiliation_ != null) { try { - Jid jid_ = new Jid(jid__); + Jid jid_ = Jid.from_string(jid__); stream.get_flag(Flag.IDENTITY).set_offline_member(iq_result.from, jid_, parse_affiliation(affiliation_)); ret_jids.add(jid_); } catch (InvalidJidError e) { @@ -574,7 +574,7 @@ public class ReceivedPipelineListener : StanzaListener<MessageStanza> { Jid? from_jid = null; try { string from = invite_node.get_attribute("from"); - if (from != null) from_jid = new Jid(from); + if (from != null) from_jid = Jid.from_string(from); } catch (InvalidJidError e) { warning("Received invite from invalid jid: %s", e.message); } @@ -594,7 +594,7 @@ public class ReceivedPipelineListener : StanzaListener<MessageStanza> { var affiliations = new HashMap<Jid, Affiliation>(); foreach (StanzaNode item_node in item_nodes) { string jid_str = item_node.get_attribute("jid", Muc.NS_URI_USER); - Jid real_jid = new Jid(jid_str); + Jid real_jid = Jid.from_string(jid_str); string affiliation_str = item_node.get_attribute("affiliation", Muc.NS_URI_USER); Muc.Affiliation affiliation = Muc.Module.parse_affiliation(affiliation_str); @@ -622,7 +622,7 @@ public class ReceivedPipelineListener : StanzaListener<MessageStanza> { if (var_ == "muc#jid"){ StanzaNode? value_node = field_node.get_subnode("value", DataForms.NS_URI); try { - if (value_node != null) from_jid = new Jid(value_node.get_string_content()); + if (value_node != null) from_jid = Jid.from_string(value_node.get_string_content()); } catch (InvalidJidError e) { return false; } |
