1
0
Fork 0
forked from blue/squawk

basic context menu, subscribing unsubscribing to contacts

This commit is contained in:
Blue 2019-06-12 20:18:18 +03:00
parent b845518ced
commit ee59d92cdc
8 changed files with 137 additions and 4 deletions

View file

@ -331,3 +331,26 @@ void Core::Squawk::removeAccountRequest(const QString& name)
emit removeAccount(name);
acc->deleteLater();
}
void Core::Squawk::subscribeContact(const QString& account, const QString& jid, const QString& reason)
{
AccountsMap::const_iterator itr = amap.find(account);
if (itr == amap.end()) {
qDebug("An attempt to subscribe to the contact with non existing account, skipping");
return;
}
itr->second->subscribeToContact(jid, reason);
}
void Core::Squawk::unsubscribeContact(const QString& account, const QString& jid, const QString& reason)
{
AccountsMap::const_iterator itr = amap.find(account);
if (itr == amap.end()) {
qDebug("An attempt to subscribe to the contact with non existing account, skipping");
return;
}
itr->second->unsubscribeFromContact(jid, reason);
}