diff options
author | Marvin W <git@larma.de> | 2017-04-18 17:53:25 +0200 |
---|---|---|
committer | Marvin W <git@larma.de> | 2017-04-18 20:20:41 +0200 |
commit | f95b4f4e0949eefaed871c267626e3ff84ce5ca6 (patch) | |
tree | e60469776bcf062d2db15e9968bf6dbd37fa1630 /xmpp-vala/src/module | |
parent | 765c2605cd0abf2b4431051142f09e2676584222 (diff) | |
download | dino-f95b4f4e0949eefaed871c267626e3ff84ce5ca6.tar.gz dino-f95b4f4e0949eefaed871c267626e3ff84ce5ca6.zip |
xmpp-vala/core+libdino: concurrency + nullity improvements
Diffstat (limited to 'xmpp-vala/src/module')
-rw-r--r-- | xmpp-vala/src/module/util.vala | 2 | ||||
-rw-r--r-- | xmpp-vala/src/module/xep/0045_muc/module.vala | 6 | ||||
-rw-r--r-- | xmpp-vala/src/module/xep/0048_bookmarks/module.vala | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/xmpp-vala/src/module/util.vala b/xmpp-vala/src/module/util.vala index 9096ea32..a0621225 100644 --- a/xmpp-vala/src/module/util.vala +++ b/xmpp-vala/src/module/util.vala @@ -1,5 +1,5 @@ namespace Xmpp { - public string? get_bare_jid(string jid) { + public string get_bare_jid(string jid) { return jid.split("/")[0]; } diff --git a/xmpp-vala/src/module/xep/0045_muc/module.vala b/xmpp-vala/src/module/xep/0045_muc/module.vala index 714bb2ca..badb7d60 100644 --- a/xmpp-vala/src/module/xep/0045_muc/module.vala +++ b/xmpp-vala/src/module/xep/0045_muc/module.vala @@ -167,16 +167,16 @@ public class Module : XmppStreamModule { flag.finish_muc_enter(bare_jid, get_resource_part(presence.from)); } } - string? affiliation = x_node["item", "affiliation"].val; + string? affiliation = x_node.get_deep_attribute("item", "affiliation"); if (affiliation != null) { received_occupant_affiliation(stream, presence.from, affiliation); } - string? jid = x_node["item", "jid"].val; + string? jid = x_node.get_deep_attribute("item", "jid"); if (jid != null) { flag.set_real_jid(presence.from, jid); received_occupant_jid(stream, presence.from, jid); } - string? role = x_node["item", "role"].val; + string? role = x_node.get_deep_attribute("item", "role"); if (role != null) { received_occupant_role(stream, presence.from, role); } diff --git a/xmpp-vala/src/module/xep/0048_bookmarks/module.vala b/xmpp-vala/src/module/xep/0048_bookmarks/module.vala index 5170c80a..0e0d9489 100644 --- a/xmpp-vala/src/module/xep/0048_bookmarks/module.vala +++ b/xmpp-vala/src/module/xep/0048_bookmarks/module.vala @@ -77,7 +77,7 @@ public class Module : XmppStreamModule { public override void detach(XmppStream stream) { } public static void require(XmppStream stream) { - if (stream.get_module(IDENTITY) == null) stderr.printf(""); + if (stream.get_module(IDENTITY) == null) stream.add_module(new Module()); } public override string get_ns() { return NS_URI; } |