1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-26 14:02:06 +01:00

A FROM value was not always present in messages sent as part of the chat.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@6308 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Gaston Dombiak 2006-12-05 07:46:29 +00:00 committed by gato
parent 0b4006d394
commit f31411c997

View file

@ -20,11 +20,14 @@
package org.jivesoftware.smack;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smack.util.collections.ReferenceMap;
import org.jivesoftware.smack.filter.AndFilter;
import org.jivesoftware.smack.filter.FromContainsFilter;
import org.jivesoftware.smack.filter.PacketFilter;
import org.jivesoftware.smack.filter.ThreadFilter;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Packet;
import org.jivesoftware.smack.filter.*;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smack.util.collections.ReferenceMap;
import java.util.*;
import java.util.concurrent.CopyOnWriteArraySet;
@ -215,6 +218,10 @@ public class ChatManager {
interceptor.getKey().interceptPacket(message);
}
}
// Ensure that messages being sent have a proper FROM value
if (message.getFrom() == null) {
message.setFrom(connection.getUser());
}
connection.sendPacket(message);
}