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/xep/0045_muc/flag.vala | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'xmpp-vala/src/module/xep/0045_muc/flag.vala') diff --git a/xmpp-vala/src/module/xep/0045_muc/flag.vala b/xmpp-vala/src/module/xep/0045_muc/flag.vala index cf729bf9..00383407 100644 --- a/xmpp-vala/src/module/xep/0045_muc/flag.vala +++ b/xmpp-vala/src/module/xep/0045_muc/flag.vala @@ -8,6 +8,7 @@ public class Flag : XmppStreamFlag { public static FlagIdentity IDENTITY = new FlagIdentity(NS_URI, "muc"); private HashMap> room_features = new HashMap>(); + private HashMap room_names = new HashMap(); private HashMap enter_ids = new HashMap(); private HashMap own_nicks = new HashMap(); @@ -18,6 +19,8 @@ public class Flag : XmppStreamFlag { private HashMap> affiliations = new HashMap>(); private HashMap occupant_role = new HashMap(); + public string? get_room_name(string jid) { return room_names.has_key(jid) ? room_names[jid] : null; } + public bool has_room_feature(string jid, Feature feature) { return room_features.has_key(jid) && room_features[jid].contains(feature); } @@ -59,6 +62,10 @@ public class Flag : XmppStreamFlag { public string? get_muc_subject(string bare_jid) { return subjects[bare_jid]; } + internal void set_room_name(string jid, string name) { + room_names[jid] = name; + } + internal void set_room_features(string jid, Gee.List features) { room_features[jid] = features; } @@ -121,4 +128,4 @@ public class Flag : XmppStreamFlag { internal override string get_id() { return IDENTITY.id; } } -} \ No newline at end of file +} -- cgit v1.2.3-54-g00ecf