Skype: forward authorization request from skype to XMPP

This commit is contained in:
HanzZ 2013-01-27 11:01:49 +01:00
parent d615da6e28
commit d068cb63ef

View file

@ -202,6 +202,7 @@ class SpectrumNetworkPlugin : public NetworkPlugin {
Skype *skype = m_sessions[user];
if (skype) {
skype->send_command("SET USER " + buddyName + " BUDDYSTATUS 1");
skype->send_command("SET USER " + buddyName + " ISAUTHORIZED FALSE");
}
}
@ -695,20 +696,9 @@ static void handle_skype_message(std::string &message, Skype *sk) {
std::vector<std::string> groups;
np->handleBuddyChanged(sk->getUser(), cmd[1], alias, groups, status, mood_text);
}
//TODO: handle RECEIVEDAUTHREQUEST and reply it with:
// void
// skype_auth_allow(gpointer sender)
// {
// skype_send_message("SET USER %s ISAUTHORIZED TRUE", sender);
// g_free(sender);
// }
//
// void
// skype_auth_deny(gpointer sender)
// {
// skype_send_message("SET USER %s ISAUTHORIZED FALSE", sender);
// g_free(sender);
// }
else if(cmd[2] == "RECEIVEDAUTHREQUEST") {
np->handleAuthorization(sk->getUser(), cmd[1]);
}
}
else if (cmd[0] == "CHATMESSAGE") {
if (cmd[3] == "RECEIVED") {