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
|
@ -199,3 +199,14 @@ void Core::Squawk::onAccountMessage(const QMap<QString, QString>& data)
|
|||
Account* acc = static_cast<Account*>(sender());
|
||||
emit accountMessage(acc->getName(), data);
|
||||
}
|
||||
|
||||
void Core::Squawk::sendMessage(const QString& account, const QMap<QString, QString>& data)
|
||||
{
|
||||
AccountsMap::const_iterator itr = amap.find(account);
|
||||
if (itr == amap.end()) {
|
||||
qDebug("An attempt to send a message with non existing account, skipping");
|
||||
return;
|
||||
}
|
||||
|
||||
itr->second->sendMessage(data);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue