forked from blue/squawk
basic sending messages
This commit is contained in:
parent
d3f537856f
commit
5575cff1f5
14 changed files with 103 additions and 3 deletions
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue