forked from blue/squawk
removed Order, resolved a crash on several files being uploaded simultaniuosly
This commit is contained in:
parent
0a530bfa93
commit
be466fbad1
12 changed files with 122 additions and 304 deletions
|
@ -51,8 +51,7 @@ void Core::MessageHandler::onMessageReceived(const QXmppMessage& msg) {
|
|||
qDebug() << "Account" << acc->getName() << "received an Omemo1 encrypted message, not supported yet";
|
||||
break; //let it go the way it is, there is nothing I can do yet
|
||||
case QXmpp::Omemo2:
|
||||
qDebug() << "Account" << acc->getName() << "received an Omemo2 encrypted message, not supported yet";
|
||||
break; //let it go the way it is, there is nothing I can do yet
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -359,6 +358,8 @@ std::pair<Shared::Message::State, QString> Core::MessageHandler::scheduleSending
|
|||
const QXmppE2eeExtension::MessageEncryptResult& res = task.result();
|
||||
if (std::holds_alternative<std::unique_ptr<QXmppMessage>>(res)) {
|
||||
const std::unique_ptr<QXmppMessage>& encrypted = std::get<std::unique_ptr<QXmppMessage>>(res);
|
||||
encrypted->setBody("This message is encrypted with OMEMO 2 but could not be decrypted");
|
||||
encrypted->setOutOfBandUrl("");
|
||||
bool success = acc->client.sendPacket(*encrypted.get());
|
||||
if (success)
|
||||
return {Shared::Message::State::sent, ""};
|
||||
|
@ -375,6 +376,7 @@ std::pair<Shared::Message::State, QString> Core::MessageHandler::scheduleSending
|
|||
if (std::holds_alternative<std::unique_ptr<QXmppMessage>>(result)) {
|
||||
const std::unique_ptr<QXmppMessage>& encrypted = std::get<std::unique_ptr<QXmppMessage>>(result);
|
||||
encrypted->setBody("This message is encrypted with OMEMO 2 but could not be decrypted");
|
||||
encrypted->setOutOfBandUrl("");
|
||||
bool success = acc->client.sendPacket(*encrypted.get());
|
||||
if (success) {
|
||||
std::tuple<bool, QString, QString> ids = getOriginalPendingMessageId(id, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue