fixed vcards with prpl-any
This commit is contained in:
parent
88f6ecb382
commit
be6e854f37
2 changed files with 9 additions and 5 deletions
|
@ -352,6 +352,10 @@ class SpectrumNetworkPlugin : public NetworkPlugin {
|
|||
void handleVCardRequest(const std::string &user, const std::string &legacyName, unsigned int id) {
|
||||
PurpleAccount *account = m_sessions[user];
|
||||
if (account) {
|
||||
std::string name = legacyName;
|
||||
if (CONFIG_STRING(config, "service.protocol") == "any") {
|
||||
name = name.substr(name.find(".") + 1);
|
||||
}
|
||||
serv_get_info(purple_account_get_connection(account), legacyName.c_str());
|
||||
m_vcards[user + legacyName] = id;
|
||||
}
|
||||
|
@ -584,7 +588,7 @@ static std::string getIconHash(PurpleBuddy *m_buddy) {
|
|||
PurpleBuddyIcon *icon = purple_buddy_icons_find(purple_buddy_get_account(m_buddy), purple_buddy_get_name(m_buddy));
|
||||
if (icon) {
|
||||
avatarHash = purple_buddy_icon_get_full_path(icon);
|
||||
// purple_buddy_icon_unref(icon);
|
||||
purple_buddy_icon_unref(icon);
|
||||
}
|
||||
|
||||
if (avatarHash) {
|
||||
|
@ -832,7 +836,7 @@ static void *notify_user_info(PurpleConnection *gc, const char *who, PurpleNotif
|
|||
if (len < 300000 && data) {
|
||||
photo = Swift::createByteArray(data, len);
|
||||
}
|
||||
// purple_imgstore_unref(avatar);
|
||||
purple_imgstore_unref(avatar);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -862,7 +866,7 @@ static void *notify_user_info(PurpleConnection *gc, const char *who, PurpleNotif
|
|||
// }
|
||||
// }
|
||||
}
|
||||
// purple_buddy_icon_unref(icon);
|
||||
purple_buddy_icon_unref(icon);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@ admin_password=test
|
|||
users_per_backend=10
|
||||
backend=../../backends/libpurple/spectrum_libpurple_backend
|
||||
#backend=../../backends/libircclient-qt/spectrum_libircclient-qt_backend
|
||||
protocol=prpl-msn
|
||||
#protocol=any
|
||||
#protocol=prpl-msn
|
||||
protocol=any
|
||||
#protocol=prpl-icq
|
||||
|
||||
[backend]
|
||||
|
|
Loading…
Add table
Reference in a new issue