diff options
author | Michael <betheg@bitcloner.org> | 2015-01-25 16:29:26 +0100 |
---|---|---|
committer | Michael <betheg@bitcloner.org> | 2015-01-25 16:58:06 +0100 |
commit | 29331e49b9fa97949e14f2a326b26c69a4ca3022 (patch) | |
tree | f9a9721c4ef037bc4c4d70a19cd2374b51ae9991 /src/main/java/eu/siacs/conversations/entities/Message.java | |
parent | 90d06d38d6a405b88d768703a52e1fa18cadfbd3 (diff) |
fix mergable() for /me command.
Diffstat (limited to 'src/main/java/eu/siacs/conversations/entities/Message.java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Message.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Message.java b/src/main/java/eu/siacs/conversations/entities/Message.java index 55a1d2ce..8112f5de 100644 --- a/src/main/java/eu/siacs/conversations/entities/Message.java +++ b/src/main/java/eu/siacs/conversations/entities/Message.java @@ -47,6 +47,7 @@ public class Message extends AbstractEntity { public static final String REMOTE_MSG_ID = "remoteMsgId"; public static final String SERVER_MSG_ID = "serverMsgId"; public static final String RELATIVE_FILE_PATH = "relativeFilePath"; + public static final String ME_COMMAND = "/me "; public boolean markable = false; protected String conversationUuid; @@ -367,7 +368,8 @@ public class Message extends AbstractEntity { (message.getTimeSent() - this.getTimeSent()) <= (Config.MESSAGE_MERGE_WINDOW * 1000) && !message.bodyContainsDownloadable() && !this.bodyContainsDownloadable() && - !this.body.startsWith("/me ") + !message.getBody().startsWith(ME_COMMAND) && + !this.getBody().startsWith(ME_COMMAND) ); } @@ -380,7 +382,7 @@ public class Message extends AbstractEntity { } public boolean hasMeCommand() { - return getMergedBody().startsWith("/me "); + return getMergedBody().startsWith(ME_COMMAND); } public int getMergedStatus() { |