mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-12-17 02:21:08 +01: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:
parent
b0fef6ffcb
commit
d47463a533
22 changed files with 612 additions and 113 deletions
|
|
@ -37,8 +37,6 @@ import org.jivesoftware.smack.SmackException.NotConnectedException;
|
|||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
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;
|
||||
|
|
@ -1847,8 +1845,11 @@ public class MultiUserChat {
|
|||
* created chat.
|
||||
* @return new Chat for sending private messages to a given room occupant.
|
||||
*/
|
||||
public Chat createPrivateChat(EntityFullJid occupant, ChatMessageListener listener) {
|
||||
return ChatManager.getInstanceFor(connection).createChat(occupant, listener);
|
||||
// TODO This should be made new not using chat.Chat. Private MUC chats are different from XMPP-IM 1:1 chats in to many ways.
|
||||
// API sketch: PrivateMucChat createPrivateChat(Resourcepart nick)
|
||||
@SuppressWarnings("deprecation")
|
||||
public org.jivesoftware.smack.chat.Chat createPrivateChat(EntityFullJid occupant, ChatMessageListener listener) {
|
||||
return org.jivesoftware.smack.chat.ChatManager.getInstanceFor(connection).createChat(occupant, listener);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue