aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/roster
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-06-16 14:29:02 +0200
committerfiaxh <git@mx.ax.lt>2017-06-17 16:13:23 +0200
commit26973c89e391de673b6ac1db024a3098b1191393 (patch)
treeeb17d5006c1e70e7e88b71700455c40081b4af47 /xmpp-vala/src/module/roster
parent7bbbb738fdb233f4ad91ffdd7d9247b28849d715 (diff)
downloaddino-26973c89e391de673b6ac1db024a3098b1191393.tar.gz
dino-26973c89e391de673b6ac1db024a3098b1191393.zip
Set jid handle in ContactDetails, use LabelHybrids more, remove edit from StartConversation
Diffstat (limited to 'xmpp-vala/src/module/roster')
-rw-r--r--xmpp-vala/src/module/roster/module.vala10
1 files changed, 4 insertions, 6 deletions
diff --git a/xmpp-vala/src/module/roster/module.vala b/xmpp-vala/src/module/roster/module.vala
index e0d8aeb3..4c1028fb 100644
--- a/xmpp-vala/src/module/roster/module.vala
+++ b/xmpp-vala/src/module/roster/module.vala
@@ -38,13 +38,11 @@ public class Module : XmppStreamModule, Iq.Handler {
* @param handle Handle to be set. If null, any handle will be removed.
*/
public void set_jid_handle(XmppStream stream, string jid, string? handle) {
- Item roster_item = new Item();
- roster_item.jid = jid;
- if (handle != null) {
- roster_item.name = handle;
- }
+ Flag flag = stream.get_flag(Flag.IDENTITY);
+ Item item = flag.get_item(jid) ?? new Item() { jid=jid };
+ item.name = handle != null ? handle : "";
- roster_set(stream, roster_item);
+ roster_set(stream, item);
}
public void on_iq_set(XmppStream stream, Iq.Stanza iq) {