aboutsummaryrefslogtreecommitdiff
path: root/juick-common/src/main/java/com/juick/util
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-04-04 22:20:52 +0300
committerGravatar Vitaly Takmazov2018-04-04 22:20:52 +0300
commit71c29cc99d1b3f71247b81bc42d30f8b52dad240 (patch)
treed859abf882d2a40e5130fbb210ab3dea8d582d42 /juick-common/src/main/java/com/juick/util
parentf86e3e089ff4e4e27133156e277c94d4cd8c7111 (diff)
server: PMs in email
* also introduces MessageUtils.isReply and MessageUtils.isPM
Diffstat (limited to 'juick-common/src/main/java/com/juick/util')
-rw-r--r--juick-common/src/main/java/com/juick/util/MessageUtils.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/juick-common/src/main/java/com/juick/util/MessageUtils.java b/juick-common/src/main/java/com/juick/util/MessageUtils.java
index 10314bb0..bb7edfc3 100644
--- a/juick-common/src/main/java/com/juick/util/MessageUtils.java
+++ b/juick-common/src/main/java/com/juick/util/MessageUtils.java
@@ -262,4 +262,10 @@ public class MessageUtils {
}
return builder.toString();
}
+ public static boolean isPM(Message message) {
+ return message.getMid() == 0;
+ }
+ public static boolean isReply(Message message) {
+ return message.getRid() > 0;
+ }
}