aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/xep/0045_muc/flag.vala
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp-vala/src/module/xep/0045_muc/flag.vala')
-rw-r--r--xmpp-vala/src/module/xep/0045_muc/flag.vala9
1 files changed, 8 insertions, 1 deletions
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<Flag> IDENTITY = new FlagIdentity<Flag>(NS_URI, "muc");
private HashMap<string, Gee.List<Feature>> room_features = new HashMap<string, Gee.List<Feature>>();
+ private HashMap<string, string> room_names = new HashMap<string, string>();
private HashMap<string, string> enter_ids = new HashMap<string, string>();
private HashMap<string, string> own_nicks = new HashMap<string, string>();
@@ -18,6 +19,8 @@ public class Flag : XmppStreamFlag {
private HashMap<string, HashMap<string, Affiliation>> affiliations = new HashMap<string, HashMap<string, Affiliation>>();
private HashMap<string, Role> occupant_role = new HashMap<string, Role>();
+ 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<Feature> 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
+}