mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 17:19:39 +02:00
Introduce ToMatchesFilter
and refactor the FromMatchesFilter into AbstractFromToMatchesFilter.
This commit is contained in:
parent
51378aebee
commit
5d0dd49e61
5 changed files with 159 additions and 38 deletions
|
@ -46,7 +46,7 @@ import org.jivesoftware.smack.filter.NotFilter;
|
|||
import org.jivesoftware.smack.filter.StanzaFilter;
|
||||
import org.jivesoftware.smack.filter.StanzaExtensionFilter;
|
||||
import org.jivesoftware.smack.filter.StanzaTypeFilter;
|
||||
import org.jivesoftware.smack.filter.ToFilter;
|
||||
import org.jivesoftware.smack.filter.ToMatchesFilter;
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.Message;
|
||||
import org.jivesoftware.smack.packet.Stanza;
|
||||
|
@ -319,7 +319,7 @@ public class MultiUserChat {
|
|||
connection.addSyncStanzaListener(subjectListener, new AndFilter(fromRoomFilter,
|
||||
MessageWithSubjectFilter.INSTANCE, new NotFilter(MessageTypeFilter.ERROR)));
|
||||
connection.addSyncStanzaListener(declinesListener, DECLINE_FILTER);
|
||||
connection.addPacketInterceptor(presenceInterceptor, new AndFilter(new ToFilter(room),
|
||||
connection.addPacketInterceptor(presenceInterceptor, new AndFilter(ToMatchesFilter.create(room),
|
||||
StanzaTypeFilter.PRESENCE));
|
||||
messageCollector = connection.createStanzaCollector(fromRoomGroupchatFilter);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue