aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/xep/0054_vcard
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2018-01-12 21:03:09 +0100
committerfiaxh <git@mx.ax.lt>2018-01-28 00:38:47 +0100
commit782ae4c049e2b6fab13d7453cbb0e74610e7d200 (patch)
tree1b4cd0a1689cee0c2e2cac2ae9a5fb8ebbe63621 /xmpp-vala/src/module/xep/0054_vcard
parentd46d071e57e599e8cfb1780597cbecb36881c4d8 (diff)
downloaddino-782ae4c049e2b6fab13d7453cbb0e74610e7d200.tar.gz
dino-782ae4c049e2b6fab13d7453cbb0e74610e7d200.zip
Move Jid class to xmpp-vala, partially refactor namespace
Diffstat (limited to 'xmpp-vala/src/module/xep/0054_vcard')
-rw-r--r--xmpp-vala/src/module/xep/0054_vcard/module.vala8
1 files changed, 3 insertions, 5 deletions
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<Module> IDENTITY = new ModuleIdentity<Module>(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);
}