aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-08-30 00:03:37 +0200
committerfiaxh <git@mx.ax.lt>2017-08-31 18:54:38 +0200
commita257b163376174e4f5efcbc82c9fdd56463c3191 (patch)
tree5aedafe95426e732d4b4790edc4e23de25844e5d /xmpp-vala/src/module
parent9b5bd0ccf0cdeb49f900450df8eea41c6a0dea75 (diff)
downloaddino-a257b163376174e4f5efcbc82c9fdd56463c3191.tar.gz
dino-a257b163376174e4f5efcbc82c9fdd56463c3191.zip
Download & inline display images
Diffstat (limited to 'xmpp-vala/src/module')
-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
}