Verified Commit 9fdbbcb2 authored by Melvin Keskin's avatar Melvin Keskin Committed by Linus Jahn
Browse files

MessageHandler: Fix sending message after offline start

If Kaidan was closed while being offline and started again, sending a
message failed because the sender could not be determined by QXmpp's
configuration.
parent e8c0fc7e
Pipeline #67704 passed with stage
in 2 minutes and 33 seconds
......@@ -37,6 +37,7 @@
#include <QXmppRosterManager.h>
#include <QXmppUtils.h>
// Kaidan
#include "AccountManager.h"
#include "ClientWorker.h"
#include "Globals.h"
#include "Kaidan.h"
......@@ -213,7 +214,7 @@ void MessageHandler::sendMessage(const QString& toJid,
const QString& spoilerHint)
{
Message msg;
msg.setFrom(m_client->configuration().jidBare());
msg.setFrom(AccountManager::instance()->jid());
msg.setTo(toJid);
msg.setBody(body);
msg.setId(QXmppUtils::generateStanzaHash());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment