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 --- xmpp-vala/src/module/iq/module.vala | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'xmpp-vala/src/module/iq') diff --git a/xmpp-vala/src/module/iq/module.vala b/xmpp-vala/src/module/iq/module.vala index 693f1da3..eed3389d 100644 --- a/xmpp-vala/src/module/iq/module.vala +++ b/xmpp-vala/src/module/iq/module.vala @@ -6,8 +6,7 @@ namespace Xmpp.Iq { private const string NS_URI = "jabber:client"; public class Module : XmppStreamNegotiationModule { - public const string ID = "iq_module"; - public static ModuleIdentity IDENTITY = new ModuleIdentity(NS_URI, ID); + public static ModuleIdentity IDENTITY = new ModuleIdentity(NS_URI, "iq_module"); private HashMap responseListeners = new HashMap(); private HashMap> namespaceRegistrants = new HashMap>(); @@ -48,10 +47,10 @@ namespace Xmpp.Iq { public override bool negotiation_active(XmppStream stream) { return false; } public override string get_ns() { return NS_URI; } - public override string get_id() { return ID; } + public override string get_id() { return IDENTITY.id; } private void on_received_iq_stanza(XmppStream stream, StanzaNode node) { - Iq.Stanza iq = new Iq.Stanza.from_stanza(node, Bind.Flag.has_flag(stream) ? Bind.Flag.get_flag(stream).my_jid : null); + Iq.Stanza iq = new Iq.Stanza.from_stanza(node, stream.has_flag(Bind.Flag.IDENTITY) ? stream.get_flag(Bind.Flag.IDENTITY).my_jid : null); if (iq.type_ == Iq.Stanza.TYPE_RESULT || iq.is_error()) { if (responseListeners.has_key(iq.id)) { -- cgit v1.2.3-70-g09d2