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/message/module.vala | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'xmpp-vala/src/module/message') diff --git a/xmpp-vala/src/module/message/module.vala b/xmpp-vala/src/module/message/module.vala index 1d54443c..060cb4cb 100644 --- a/xmpp-vala/src/module/message/module.vala +++ b/xmpp-vala/src/module/message/module.vala @@ -6,8 +6,7 @@ namespace Xmpp.Message { private const string NS_URI = "jabber:client"; public class Module : XmppStreamModule { - public const string ID = "message_module"; - public static ModuleIdentity IDENTITY = new ModuleIdentity(NS_URI, ID); + public static ModuleIdentity IDENTITY = new ModuleIdentity(NS_URI, "message_module"); public signal void pre_send_message(XmppStream stream, Message.Stanza message); public signal void pre_received_message(XmppStream stream, Message.Stanza message); @@ -19,7 +18,7 @@ namespace Xmpp.Message { } public void received_message_stanza(XmppStream stream, StanzaNode node) { - Message.Stanza message = new Message.Stanza.from_stanza(node, Bind.Flag.get_flag(stream).my_jid); + Message.Stanza message = new Message.Stanza.from_stanza(node, stream.get_flag(Bind.Flag.IDENTITY).my_jid); do { message.rerun_parsing = false; pre_received_message(stream, message); @@ -41,7 +40,7 @@ namespace Xmpp.Message { } public override string get_ns() { return NS_URI; } - public override string get_id() { return ID; } + public override string get_id() { return IDENTITY.id; } } } -- cgit v1.2.3-70-g09d2