diff options
author | fiaxh <git@mx.ax.lt> | 2017-03-19 12:55:36 +0100 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-03-20 22:28:27 +0100 |
commit | db57a973534f099af2b150f1a1307d1948553d9f (patch) | |
tree | 238ae1d4e53412a33e3febd07318dfd38b0eb2f8 /plugins/openpgp/src/stream_module.vala | |
parent | 233f2b35d033cd20d1ac648bf2d723bcb7a918fc (diff) | |
download | dino-db57a973534f099af2b150f1a1307d1948553d9f.tar.gz dino-db57a973534f099af2b150f1a1307d1948553d9f.zip |
Add typed identity to manager modules and stream flags
Diffstat (limited to 'plugins/openpgp/src/stream_module.vala')
-rw-r--r-- | plugins/openpgp/src/stream_module.vala | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/openpgp/src/stream_module.vala b/plugins/openpgp/src/stream_module.vala index 6de97066..b9742624 100644 --- a/plugins/openpgp/src/stream_module.vala +++ b/plugins/openpgp/src/stream_module.vala @@ -9,8 +9,7 @@ namespace Dino.Plugins.OpenPgp { private const string NS_URI_SIGNED = NS_URI + ":signed"; public class Module : XmppStreamModule { - public const string ID = "0027_current_pgp_usage"; - public static ModuleIdentity<Module> IDENTITY = new ModuleIdentity<Module>(NS_URI, ID); + public static Core.ModuleIdentity<Module> IDENTITY = new Core.ModuleIdentity<Module>(NS_URI, "0027_current_pgp_usage"); public signal void received_jid_key_id(XmppStream stream, string jid, string key_id); @@ -69,7 +68,7 @@ namespace Dino.Plugins.OpenPgp { } 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_presence(XmppStream stream, Presence.Stanza presence) { StanzaNode x_node = presence.stanza.get_subnode("x", NS_URI_SIGNED); @@ -79,7 +78,7 @@ namespace Dino.Plugins.OpenPgp { string signed_data = presence.status == null ? "" : presence.status; string? key_id = get_sign_key(sig, signed_data); if (key_id != null) { - Flag.get_flag(stream).set_key_id(presence.from, key_id); + stream.get_flag(Flag.IDENTITY).set_key_id(presence.from, key_id); received_jid_key_id(stream, presence.from, key_id); } } |