muc joining leaving debug, notification debug, delayed delivery wannabe detection

This commit is contained in:
Blue 2019-08-31 23:50:05 +03:00
parent a51907b810
commit f5fa45d853
8 changed files with 87 additions and 22 deletions

View file

@ -572,7 +572,10 @@ bool Core::Account::handleGroupMessage(const QXmppMessage& msg, bool outgoing, b
}
cnt->appendMessageToArchive(sMsg);
emit message(sMsg);
QDateTime fiveMinsAgo = QDateTime::currentDateTime().addSecs(-300);
if (sMsg.getTime() > fiveMinsAgo) { //otherwise it's considered a delayed delivery, most probably MUC history receipt
emit message(sMsg);
}
if (!forwarded && !outgoing) {
if (msg.isReceiptRequested() && id.size() > 0) {

View file

@ -64,7 +64,7 @@ bool Core::Conference::getJoined() const
void Core::Conference::setJoined(bool p_joined)
{
if (joined != p_joined) {
if (joined) {
if (p_joined) {
room->join();
} else {
room->leave();

View file

@ -424,7 +424,7 @@ void Core::Squawk::setRoomJoined(const QString& account, const QString& jid, boo
{
AccountsMap::const_iterator itr = amap.find(account);
if (itr == amap.end()) {
qDebug() << "An attempt to set autoJoin to the room" << jid << "of non existing account" << account << ", skipping";
qDebug() << "An attempt to set jouned to the room" << jid << "of non existing account" << account << ", skipping";
return;
}
itr->second->setRoomJoined(jid, joined);