1
0
Fork 0
forked from blue/squawk

basic sending messages

This commit is contained in:
Blue 2019-04-10 23:53:42 +03:00
parent d3f537856f
commit 5575cff1f5
14 changed files with 103 additions and 3 deletions

View file

@ -406,3 +406,12 @@ QString Core::Account::getFullJid() const
return getLogin() + "@" + getServer() + "/" + getResource();
}
void Core::Account::sendMessage(const QMap<QString, QString>& data)
{
if (state == Shared::connected) {
client.sendMessage(data.value("to"), data.value("body"));
} else {
qDebug() << "An attempt to send message with not connected account " << name << ", skipping";
}
}