forked from blue/squawk
found a way to avoid requesting all the MUCs history alltogether on startup
This commit is contained in:
parent
3a120c773a
commit
ef1a9846bf
4 changed files with 34 additions and 6 deletions
|
@ -248,18 +248,22 @@ void Core::RosterItem::appendMessageToArchive(const Shared::Message& msg)
|
|||
}
|
||||
break;
|
||||
case beginning:
|
||||
appendCache.push_back(msg);
|
||||
if (!syncronizing) {
|
||||
requestHistory(-1, getId(msg));
|
||||
if (!archive->hasElement(msg.getId())) {
|
||||
appendCache.push_back(msg);
|
||||
if (!syncronizing) {
|
||||
requestHistory(-1, getId(msg));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case end:
|
||||
archive->addElement(msg);
|
||||
break;
|
||||
case chunk:
|
||||
appendCache.push_back(msg);
|
||||
if (!syncronizing) {
|
||||
requestHistory(-1, getId(msg));
|
||||
if (!archive->hasElement(msg.getId())) {
|
||||
appendCache.push_back(msg);
|
||||
if (!syncronizing) {
|
||||
requestHistory(-1, getId(msg));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case complete:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue