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) {
|
query = ^(NSString* _Nullable before) {
|
||||||
XMPPIQ* query = [[XMPPIQ alloc] initWithType:kiqSetType];
|
XMPPIQ* query = [[XMPPIQ alloc] initWithType:kiqSetType];
|
||||||
if(contact.isMuc)
|
if(isMuc)
|
||||||
{
|
{
|
||||||
if(!before)
|
if(!before)
|
||||||
before = [[DataLayer sharedInstance] lastStanzaIdForMuc:contact.contactJid andAccount:self.accountID];
|
before = [[DataLayer sharedInstance] lastStanzaIdForMuc:jid andAccount:accId];
|
||||||
[query setiqTo:contact.contactJid];
|
[query setiqTo:jid];
|
||||||
[query setMAMQueryLatestMessagesForJid:nil before:before];
|
[query setMAMQueryLatestMessagesForJid:nil before:before];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(!before)
|
if(!before)
|
||||||
before = [[DataLayer sharedInstance] lastStanzaIdForAccount:self.accountID];
|
before = [[DataLayer sharedInstance] lastStanzaIdForAccount:accId];
|
||||||
[query setMAMQueryLatestMessagesForJid:contact.contactJid before:before];
|
[query setMAMQueryLatestMessagesForJid:jid before:before];
|
||||||
}
|
}
|
||||||
DDLogDebug(@"Loading (next) mam:2 page 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
|
//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
|
end
|
||||||
|
|
||||||
target 'monalxmpp' do
|
target 'monalxmpp' do
|
||||||
|
use_frameworks!
|
||||||
|
inhibit_all_warnings!
|
||||||
monalxmpp
|
monalxmpp
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue