mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-23 06:42:05 +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:
parent
0b4006d394
commit
f31411c997
1 changed files with 10 additions and 3 deletions
|
@ -20,11 +20,14 @@
|
||||||
|
|
||||||
package org.jivesoftware.smack;
|
package org.jivesoftware.smack;
|
||||||
|
|
||||||
import org.jivesoftware.smack.util.StringUtils;
|
import org.jivesoftware.smack.filter.AndFilter;
|
||||||
import org.jivesoftware.smack.util.collections.ReferenceMap;
|
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.Message;
|
||||||
import org.jivesoftware.smack.packet.Packet;
|
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.*;
|
||||||
import java.util.concurrent.CopyOnWriteArraySet;
|
import java.util.concurrent.CopyOnWriteArraySet;
|
||||||
|
@ -215,6 +218,10 @@ public class ChatManager {
|
||||||
interceptor.getKey().interceptPacket(message);
|
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);
|
connection.sendPacket(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue