From 782ae4c049e2b6fab13d7453cbb0e74610e7d200 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Fri, 12 Jan 2018 21:03:09 +0100 Subject: Move Jid class to xmpp-vala, partially refactor namespace --- xmpp-vala/src/module/xep/0054_vcard/module.vala | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'xmpp-vala/src/module/xep/0054_vcard/module.vala') diff --git a/xmpp-vala/src/module/xep/0054_vcard/module.vala b/xmpp-vala/src/module/xep/0054_vcard/module.vala index 2fc055cf..0627c076 100644 --- a/xmpp-vala/src/module/xep/0054_vcard/module.vala +++ b/xmpp-vala/src/module/xep/0054_vcard/module.vala @@ -1,5 +1,3 @@ -using Xmpp.Core; - namespace Xmpp.Xep.VCard { private const string NS_URI = "vcard-temp"; private const string NS_URI_UPDATE = NS_URI + ":x:update"; @@ -7,7 +5,7 @@ private const string NS_URI_UPDATE = NS_URI + ":x:update"; public class Module : XmppStreamModule { public static ModuleIdentity IDENTITY = new ModuleIdentity(NS_URI, "0153_vcard_based_avatars"); - public signal void received_avatar(XmppStream stream, string jid, string id); + public signal void received_avatar(XmppStream stream, Jid jid, string id); private PixbufStorage storage; @@ -37,14 +35,14 @@ public class Module : XmppStreamModule { if (stream.get_flag(Muc.Flag.IDENTITY).is_occupant(presence.from)) { received_avatar(stream, presence.from, sha1); } else { - received_avatar(stream, get_bare_jid(presence.from), sha1); + received_avatar(stream, presence.from.bare_jid, sha1); } } else { Iq.Stanza iq = new Iq.Stanza.get(new StanzaNode.build("vCard", NS_URI).add_self_xmlns()); if (stream.get_flag(Muc.Flag.IDENTITY).is_occupant(presence.from)) { iq.to = presence.from; } else { - iq.to = get_bare_jid(presence.from); + iq.to = presence.from.bare_jid; } stream.get_module(Iq.Module.IDENTITY).send_iq(stream, iq, on_received_vcard); } -- cgit v1.2.3-54-g00ecf