1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 09:09:38 +02:00

Deprecate Chat API, introduce new Chat API

Also add (From|To)TypeFilter and update/fix the documentation in a few places.
This commit is contained in:
Florian Schmaus 2017-01-11 19:35:55 +01:00
parent b0fef6ffcb
commit d47463a533
22 changed files with 612 additions and 113 deletions

View file

@ -28,8 +28,6 @@ import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.StanzaListener;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException.XMPPErrorException;
import org.jivesoftware.smack.chat.Chat;
import org.jivesoftware.smack.chat.ChatManager;
import org.jivesoftware.smack.chat.ChatMessageListener;
import org.jivesoftware.smack.filter.AndFilter;
import org.jivesoftware.smack.filter.FromMatchesFilter;
@ -146,8 +144,10 @@ public class MultiUserChatLight {
* for the newly created chat.
* @return new Chat for sending private messages to a given room occupant.
*/
public Chat createPrivateChat(EntityJid occupant, ChatMessageListener listener) {
return ChatManager.getInstanceFor(connection).createChat(occupant, listener);
@Deprecated
// Do not re-use Chat API, which was designed for XMPP-IM 1:1 chats and not MUClight private chats.
public org.jivesoftware.smack.chat.Chat createPrivateChat(EntityJid occupant, ChatMessageListener listener) {
return org.jivesoftware.smack.chat.ChatManager.getInstanceFor(connection).createChat(occupant, listener);
}
/**