1
0
Fork 0
forked from blue/squawk

doovers for failed messages, some corner cases fixes with handling errors during message sending

This commit is contained in:
Blue 2021-05-23 01:03:14 +03:00
parent ddfaa63a24
commit 3f1fba4de2
Signed by untrusted user: blue
GPG key ID: 9B203B252A63EE38
12 changed files with 89 additions and 19 deletions

View file

@ -328,13 +328,24 @@ void Core::Squawk::sendMessage(const QString& account, const Shared::Message& da
{
AccountsMap::const_iterator itr = amap.find(account);
if (itr == amap.end()) {
qDebug("An attempt to send a message with non existing account, skipping");
qDebug() << "An attempt to send a message with non existing account" << account << ", skipping";
return;
}
itr->second->sendMessage(data);
}
void Core::Squawk::resendMessage(const QString& account, const QString& jid, const QString& id)
{
AccountsMap::const_iterator itr = amap.find(account);
if (itr == amap.end()) {
qDebug() << "An attempt to resend a message with non existing account" << account << ", skipping";
return;
}
itr->second->resendMessage(jid, id);
}
void Core::Squawk::requestArchive(const QString& account, const QString& jid, int count, const QString& before)
{
AccountsMap::const_iterator itr = amap.find(account);