From db57a973534f099af2b150f1a1307d1948553d9f Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sun, 19 Mar 2017 12:55:36 +0100 Subject: Add typed identity to manager modules and stream flags --- plugins/omemo/src/stream_module.vala | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'plugins/omemo/src/stream_module.vala') diff --git a/plugins/omemo/src/stream_module.vala b/plugins/omemo/src/stream_module.vala index 14b1a93e..480d8705 100644 --- a/plugins/omemo/src/stream_module.vala +++ b/plugins/omemo/src/stream_module.vala @@ -14,8 +14,7 @@ private const string NODE_VERIFICATION = NS_URI + ".verification"; private const int NUM_KEYS_TO_PUBLISH = 100; public class StreamModule : XmppStreamModule { - private const string ID = "omemo_module"; - public static ModuleIdentity IDENTITY = new ModuleIdentity(NS_URI, ID); + public static Core.ModuleIdentity IDENTITY = new Core.ModuleIdentity(NS_URI, "omemo_module"); private Store store; private ConcurrentSet active_bundle_requests = new ConcurrentSet(); @@ -189,7 +188,7 @@ public class StreamModule : XmppStreamModule { public void on_devicelist(XmppStream stream, string jid, string id, StanzaNode? node_) { StanzaNode? node = node_; - if (jid == get_bare_jid(Bind.Flag.get_flag(stream).my_jid) && store.local_registration_id != 0) { + if (jid == get_bare_jid(stream.get_flag(Bind.Flag.IDENTITY).my_jid) && store.local_registration_id != 0) { if (node == null) { node = new StanzaNode.build("list", NS_URI).add_self_xmlns().put_node(new StanzaNode.build("device", NS_URI)); } @@ -422,7 +421,7 @@ public class StreamModule : XmppStreamModule { } public override string get_id() { - return ID; + return IDENTITY.id; } } -- cgit v1.2.3-70-g09d2