smoverlay/net-im/spectrum/files/spectrum-1.4.7_remoteroster...

33 lines
1.4 KiB
Diff
Raw Normal View History

diff --git a/src/spectrumbuddy.cpp b/src/spectrumbuddy.cpp
index 74d5194..910266c 100644
--- a/src/spectrumbuddy.cpp
+++ b/src/spectrumbuddy.cpp
@@ -36,10 +36,10 @@ SpectrumBuddy::~SpectrumBuddy() {
std::string SpectrumBuddy::getAlias() {
std::string alias;
- if (purple_buddy_get_server_alias(m_buddy))
- alias = (std::string) purple_buddy_get_server_alias(m_buddy);
- else
+ if (purple_buddy_get_alias(m_buddy))
alias = (std::string) purple_buddy_get_alias(m_buddy);
+ else
+ alias = (std::string) purple_buddy_get_server_alias(m_buddy);
return alias;
}
diff --git a/src/sql.cpp b/src/sql.cpp
index 8fbc64a..70bf5db 100644
--- a/src/sql.cpp
+++ b/src/sql.cpp
@@ -905,7 +905,8 @@ GHashTable *SQLClass::getBuddies(long userId, PurpleAccount *account) {
// create buddy
buddy = purple_buddy_new(account, buddyUins[k].c_str(), buddyNicknames[k].c_str());
purple_blist_add_buddy(buddy, contact, g, NULL);
- Log("ADDING BUDDY", buddyIds[k] << " " << buddyUins[k] << " subscription: " << subscription << " " << buddy);
+ purple_blist_server_alias_buddy(buddy, buddyNicknames[k].c_str());
+ Log("ADDING BUDDY", buddyIds[k] << " " << buddyUins[k] << " " << buddyNicknames[k] << " subscription: " << subscription << " " << buddy);
// add settings
GHashTable *settings = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, (GDestroyNotify) purple_value_destroy);