diff --git a/backends/libpurple/main.cpp b/backends/libpurple/main.cpp index 44065f795b3f1ed188e51d1e33f3ce849b093284..32e0c9285c301c315774e3233240463152d7c86b 100644 --- a/backends/libpurple/main.cpp +++ b/backends/libpurple/main.cpp @@ -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); } }