Commit 4cffe95b authored by Grigory Fedorov's avatar Grigory Fedorov

Merge branch 'bostrt-spamfix' into develop

parents 16524928 ade9d7f4
...@@ -215,8 +215,12 @@ public class RoomChat extends AbstractChat { ...@@ -215,8 +215,12 @@ public class RoomChat extends AbstractChat {
RosterManager.getInstance().onContactChanged(account, bareAddress); RosterManager.getInstance().onContactChanged(account, bareAddress);
newAction(resource, subject, ChatAction.subject); newAction(resource, subject, ChatAction.subject);
} else { } else {
boolean notify = true;
String packetID = message.getPacketID(); String packetID = message.getPacketID();
Date delay = Delay.getDelay(message); Date delay = Delay.getDelay(message);
if (delay != null) {
notify = false;
}
for (MessageItem messageItem : messages) { for (MessageItem messageItem : messages) {
// Search for duplicates // Search for duplicates
if (packetID != null && packetID.equals(messageItem.getPacketID())) { if (packetID != null && packetID.equals(messageItem.getPacketID())) {
...@@ -232,7 +236,7 @@ public class RoomChat extends AbstractChat { ...@@ -232,7 +236,7 @@ public class RoomChat extends AbstractChat {
} }
updateThreadId(message.getThread()); updateThreadId(message.getThread());
MessageItem messageItem = newMessage(resource, text, null, MessageItem messageItem = newMessage(resource, text, null,
delay, true, true, false, false, true); delay, true, notify, false, false, true);
messageItem.setPacketID(packetID); messageItem.setPacketID(packetID);
} }
} else if (packet instanceof Presence) { } else if (packet instanceof Presence) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment