From 26973c89e391de673b6ac1db024a3098b1191393 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Fri, 16 Jun 2017 14:29:02 +0200 Subject: Set jid handle in ContactDetails, use LabelHybrids more, remove edit from StartConversation --- xmpp-vala/src/module/roster/module.vala | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'xmpp-vala/src/module/roster') 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) { -- cgit v1.2.3-70-g09d2