summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/ICQ-WIM/src/poll.cpp6
-rw-r--r--protocols/ICQ-WIM/src/server.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/protocols/ICQ-WIM/src/poll.cpp b/protocols/ICQ-WIM/src/poll.cpp
index 47cbc75890..db15c5be6f 100644
--- a/protocols/ICQ-WIM/src/poll.cpp
+++ b/protocols/ICQ-WIM/src/poll.cpp
@@ -268,10 +268,12 @@ void CIcqProto::ProcessImState(const JSONNode &ev)
void CIcqProto::ProcessMyInfo(const JSONNode &ev)
{
- const JSONNode &var = ev["friendly"];
- if (var)
+ if (auto &var = ev["friendly"])
setWString("Nick", var.as_mstring());
+ if (auto &var = ev["attachedPhoneNumber"])
+ setWString(DB_KEY_PHONE, var.as_mstring());
+
CheckAvatarChange(0, ev);
}
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp
index 43d7369a2c..c77070156d 100644
--- a/protocols/ICQ-WIM/src/server.cpp
+++ b/protocols/ICQ-WIM/src/server.cpp
@@ -1130,9 +1130,7 @@ void CIcqProto::OnStartSession(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest *)
m_fetchBaseURL = data["fetchBaseURL"].as_mstring();
m_aimsid = data["aimsid"].as_mstring();
- CMStringW wszPhone(data["attachedPhoneNumber"].as_mstring());
- if (!wszPhone.IsEmpty())
- setWString(DB_KEY_PHONE, wszPhone);
+ ProcessMyInfo(data["myInfo"]);
int srvTS = data["ts"].as_int();
m_iTimeShift = (srvTS) ? time(0) - srvTS : 0;