aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/xep/0045_muc
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp-vala/src/module/xep/0045_muc')
-rw-r--r--xmpp-vala/src/module/xep/0045_muc/flag.vala5
-rw-r--r--xmpp-vala/src/module/xep/0045_muc/module.vala4
2 files changed, 5 insertions, 4 deletions
diff --git a/xmpp-vala/src/module/xep/0045_muc/flag.vala b/xmpp-vala/src/module/xep/0045_muc/flag.vala
index 00383407..0e1d0c10 100644
--- a/xmpp-vala/src/module/xep/0045_muc/flag.vala
+++ b/xmpp-vala/src/module/xep/0045_muc/flag.vala
@@ -37,8 +37,9 @@ public class Flag : XmppStreamFlag {
return ret;
}
- public Affiliation? get_affiliation(string muc_jid, string full_jid) {
- if (affiliations.has_key(muc_jid) && affiliations[muc_jid].has_key(full_jid)) return affiliations[muc_jid][full_jid];
+ public Affiliation get_affiliation(string muc_jid, string full_jid) {
+ HashMap<string, Affiliation>? muc_affiliations = affiliations[muc_jid];
+ if (muc_affiliations != null) return muc_affiliations[full_jid];
return Affiliation.NONE;
}
diff --git a/xmpp-vala/src/module/xep/0045_muc/module.vala b/xmpp-vala/src/module/xep/0045_muc/module.vala
index 98fda1a1..0b92119c 100644
--- a/xmpp-vala/src/module/xep/0045_muc/module.vala
+++ b/xmpp-vala/src/module/xep/0045_muc/module.vala
@@ -22,16 +22,16 @@ public enum MucEnterError {
}
public enum Affiliation {
+ NONE,
ADMIN,
MEMBER,
- NONE,
OUTCAST,
OWNER
}
public enum Role {
- MODERATOR,
NONE,
+ MODERATOR,
PARTICIPANT,
VISITOR
}