wip
This commit is contained in:
parent
413d4f1c72
commit
9b91add453
|
@ -4431,20 +4431,23 @@ NSString* const kStanza = @"stanza";
|
|||
}
|
||||
}
|
||||
};
|
||||
NSString *jid = contact.contactJid;
|
||||
BOOL isMuc = contact.isMuc;
|
||||
NSNumber *accId = self.accountID;
|
||||
query = ^(NSString* _Nullable before) {
|
||||
XMPPIQ* query = [[XMPPIQ alloc] initWithType:kiqSetType];
|
||||
if(contact.isMuc)
|
||||
if(isMuc)
|
||||
{
|
||||
if(!before)
|
||||
before = [[DataLayer sharedInstance] lastStanzaIdForMuc:contact.contactJid andAccount:self.accountID];
|
||||
[query setiqTo:contact.contactJid];
|
||||
before = [[DataLayer sharedInstance] lastStanzaIdForMuc:jid andAccount:accId];
|
||||
[query setiqTo:jid];
|
||||
[query setMAMQueryLatestMessagesForJid:nil before:before];
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!before)
|
||||
before = [[DataLayer sharedInstance] lastStanzaIdForAccount:self.accountID];
|
||||
[query setMAMQueryLatestMessagesForJid:contact.contactJid before:before];
|
||||
before = [[DataLayer sharedInstance] lastStanzaIdForAccount:accId];
|
||||
[query setMAMQueryLatestMessagesForJid:jid before:before];
|
||||
}
|
||||
DDLogDebug(@"Loading (next) mam:2 page before: %@", before);
|
||||
//we always want to use blocks here because we want to make sure we get not interrupted by an app crash/restart
|
||||
|
|
|
@ -58,6 +58,8 @@ target 'Monal' do
|
|||
end
|
||||
|
||||
target 'monalxmpp' do
|
||||
use_frameworks!
|
||||
inhibit_all_warnings!
|
||||
monalxmpp
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue