aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/entities
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-01-21 14:32:22 +0100
committerChristian Schneppe <christian@pix-art.de>2018-01-21 14:32:22 +0100
commit64bee71d95b2e700938c97dbf4a7daf4ee139e1f (patch)
tree4ddb668c5ac36756a798ff75886b92a2474b68cf /src/main/java/de/pixart/messenger/entities
parent6e63c99120f556c541e5a41b727866ee3123c911 (diff)
show warning toast if PM is disabled in MUC
Diffstat (limited to 'src/main/java/de/pixart/messenger/entities')
-rw-r--r--src/main/java/de/pixart/messenger/entities/MucOptions.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/MucOptions.java b/src/main/java/de/pixart/messenger/entities/MucOptions.java
index e64f78648..12987cfc9 100644
--- a/src/main/java/de/pixart/messenger/entities/MucOptions.java
+++ b/src/main/java/de/pixart/messenger/entities/MucOptions.java
@@ -397,6 +397,11 @@ public class MucOptions {
return self.getRole().ranks(Role.MODERATOR) || (field != null && "1".equals(field.getValue()));
}
+ public boolean allowPm() {
+ Field field = this.form.getFieldByName("muc#roomconfig_allowpm");
+ return field == null || "1".equals(field.getValue());
+ }
+
public boolean participating() {
return !online()
|| self.getRole().ranks(Role.PARTICIPANT)