svn commit: r7018 - trunk/src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatManager.java

damencho at dev.java.net damencho at dev.java.net
Tue Apr 20 13:52:32 CEST 2010


Author: damencho
Date: 2010-04-20 11:52:30+0000
New Revision: 7018

Modified:
   trunk/src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatManager.java

Log:
Notify users in multi-chat rooms for new messages addressed to them (comparing only nickname).

Modified: trunk/src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatManager.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatManager.java?view=diff&rev=7018&p1=trunk/src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatManager.java&p2=trunk/src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatManager.java&r1=7017&r2=7018
==============================================================================
--- trunk/src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatManager.java	(original)
+++ trunk/src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatManager.java	2010-04-20 11:52:30+0000
@@ -211,12 +211,8 @@
             break;
         }
 
-        logger
-            .info("MESSAGE RECEIVED from " + sourceMember.getContactAddress());
-        logger
-            .trace(
-                "MESSAGE RECEIVED from contact: "
-                    + sourceMember.getContactAddress());
+        logger.trace("MESSAGE RECEIVED from contact: "
+            + sourceMember.getContactAddress());
 
         Message message = evt.getMessage();
 
@@ -267,10 +263,14 @@
         {
             String nickname = sourceChatRoom.getUserNickname();
 
+            int atIx = nickname.indexOf("@");
+
             fireChatNotification =
                 (nickname == null)
                     || messageContent.toLowerCase().contains(
-                        nickname.toLowerCase());
+                        nickname.toLowerCase())
+                    || ((atIx == -1)? false : messageContent.toLowerCase()
+                        .contains(nickname.substring(0, atIx + 1)));
         }
         if (fireChatNotification)
         {

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe at sip-communicator.dev.java.net
For additional commands, e-mail: commits-help at sip-communicator.dev.java.net





More information about the commits mailing list