Stops showing toast popups for your own messages in MUC
@@ -1143,12 +1143,13 @@ public class ChatContainer extends SparkTabbedPane implements MessageListener, C
fromNickName = mucNickName[1];
}
}
+ String myNickName = chatRoom.getNickname().toString();
+ if (!myNickName.equals(fromNickName)) {
if (localPref.isMucHighToastEnabled()) {
// allowed to check for new messages containing name
- Resourcepart myNickName = chatRoom.getNickname();
String myUserName = SparkManager.getSessionManager().getUsername();
Pattern usernameMatch = Pattern.compile(myUserName, Pattern.CASE_INSENSITIVE);
- Pattern nicknameMatch = Pattern.compile(myNickName.toString(), Pattern.CASE_INSENSITIVE);
+ Pattern nicknameMatch = Pattern.compile(myNickName, Pattern.CASE_INSENSITIVE);
if (usernameMatch.matcher(lastChatMessage.getBody()).find() || nicknameMatch.matcher(lastChatMessage.getBody()).find()) {
// match, send new message
@@ -1173,6 +1174,7 @@ public class ChatContainer extends SparkTabbedPane implements MessageListener, C
startFlashing(chatRoom, customMsgS, customMsgTextS, customMsgTitleS);
}
+ }
} else if (customMsg) {
// probablt a file transfer request
boolean customMsgS = customMsg;
