Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: Client/Contact.java
- ===================================================================
- --- Client/Contact.java (revision 1039)
- +++ Client/Contact.java (working copy)
- @@ -338,18 +338,27 @@
- public void addMessage(Msg m) {
- boolean last_replace = false;
- - if (origin != ORIGIN_GROUPCHAT) {
- - if (msgs.size() > 0 && m.isPresence()) {
- + if (origin == ORIGIN_GROUPCHAT) {
- + /*if (msgs.size() > 0 && m.isPresence()) {
- Object item = msgs.lastElement();
- if (item != null) {
- if (((MessageItem) item).msg.isPresence()) {
- last_replace = true;
- }
- }
- - } else {
- + } else {*/
- if (cf.showNickNames && m.messageType != Msg.MESSAGE_TYPE_PRESENCE) {
- StringBuffer who = new StringBuffer();
- - who.append((m.messageType == Msg.MESSAGE_TYPE_OUT) ? sd.account.getNickName() : getName()).append(" (").append(m.getTime()).append(") ");
- + Contact c=StaticData.getInstance().roster.getContact(m.from, true);
- + String nickName = c.getName();
- +//#if NICK_COLORS
- + who.append("\01");
- +//#endif
- + who.append(nickName);//.append(" (").append(m.getTime()).append("):");
- +//#if NICK_COLORS
- + who.append("\02");
- +//#endif
- + who.append(" (").append(m.getTime()).append("):");
- if (m.subject != null) {
- who.append("\n").append(m.subject);
- }
- @@ -357,10 +366,12 @@
- }
- if (m.body.startsWith("/me ")) {
- StringBuffer b = new StringBuffer();
- + Contact c=StaticData.getInstance().roster.getContact(m.from, true);
- + String nickName = c.getName();
- //#if NICK_COLORS
- b.append("\01");
- //#endif
- - b.append((m.messageType == Msg.MESSAGE_TYPE_OUT) ? sd.account.getNickName() : getName());
- + b.append(nickName);
- //#if NICK_COLORS
- b.append("\02");
- //#endif
- @@ -369,7 +380,7 @@
- m.body = b.toString();
- b = null;
- }
- - }
- + //}
- } else {
- status = Presence.PRESENCE_ONLINE;
- //#ifdef LOGROTATE
- Index: Client/Roster.java
- ===================================================================
- --- Client/Roster.java (revision 1039)
- +++ Client/Roster.java (working copy)
- @@ -1464,7 +1464,7 @@
- //#endif
- if (name==null) name=c.getName();
- // /me
- - if (body!=null) {
- + /*if (body!=null) {
- //forme=false;
- if (body.startsWith("/me ")) start_me=3;
- if (start_me>=0) {
- @@ -1487,7 +1487,7 @@
- b=null;
- }
- - }
- + }*/
- //boolean compose=false;
- if (type.equals("chat") && myStatus!=Presence.PRESENCE_INVISIBLE) {
- if (message.findNamespace("request", "urn:xmpp:receipts")!=null) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement