mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-27 00:32:07 +01:00
Send request after the PacketCollector was setup
This bug was introduced with 7bd7b3d24
. Thanks to Lars Noschinski for
discovering it.
This commit is contained in:
parent
3093333533
commit
2c7f1efe80
1 changed files with 1 additions and 2 deletions
|
@ -141,8 +141,6 @@ public class OfflineMessageManager {
|
||||||
item.setAction("view");
|
item.setAction("view");
|
||||||
request.addItem(item);
|
request.addItem(item);
|
||||||
}
|
}
|
||||||
connection.createPacketCollectorAndSend(request).nextResultOrThrow();
|
|
||||||
|
|
||||||
// Filter offline messages that were requested by this request
|
// Filter offline messages that were requested by this request
|
||||||
PacketFilter messageFilter = new AndFilter(packetFilter, new PacketFilter() {
|
PacketFilter messageFilter = new AndFilter(packetFilter, new PacketFilter() {
|
||||||
public boolean accept(Packet packet) {
|
public boolean accept(Packet packet) {
|
||||||
|
@ -152,6 +150,7 @@ public class OfflineMessageManager {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
PacketCollector messageCollector = connection.createPacketCollector(messageFilter);
|
PacketCollector messageCollector = connection.createPacketCollector(messageFilter);
|
||||||
|
connection.createPacketCollectorAndSend(request).nextResultOrThrow();
|
||||||
// Collect the received offline messages
|
// Collect the received offline messages
|
||||||
Message message = (Message) messageCollector.nextResult();
|
Message message = (Message) messageCollector.nextResult();
|
||||||
while (message != null) {
|
while (message != null) {
|
||||||
|
|
Loading…
Reference in a new issue