summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-03-25 15:09:07 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-03-25 15:09:07 +0300
commitb34afd8a8f6e35541f928c2f4879413fd1d28601 (patch)
treef6535a8cf819f892294d665e5708aae27136792c /protocols
parent1c83a98fd2de7a2d1f506da4ef4b058351315ca9 (diff)
ICQ-WIM: no need to wipe out Nick field
Diffstat (limited to 'protocols')
-rw-r--r--protocols/ICQ-WIM/src/poll.cpp5
-rw-r--r--protocols/ICQ-WIM/src/server.cpp5
2 files changed, 8 insertions, 2 deletions
diff --git a/protocols/ICQ-WIM/src/poll.cpp b/protocols/ICQ-WIM/src/poll.cpp
index c42bb10b93..9296b90090 100644
--- a/protocols/ICQ-WIM/src/poll.cpp
+++ b/protocols/ICQ-WIM/src/poll.cpp
@@ -197,7 +197,10 @@ void CIcqProto::ProcessImState(const JSONNode &ev)
void CIcqProto::ProcessMyInfo(const JSONNode &ev)
{
- Json2string(0, ev, "friendly", "Nick");
+ const JSONNode &var = ev["friendly"];
+ if (var)
+ setWString("Nick", var.as_mstring());
+
CheckAvatarChange(0, ev);
}
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp
index 14c94444bc..e7add0cec7 100644
--- a/protocols/ICQ-WIM/src/server.cpp
+++ b/protocols/ICQ-WIM/src/server.cpp
@@ -261,7 +261,10 @@ MCONTACT CIcqProto::ParseBuddyInfo(const JSONNode &buddy, MCONTACT hContact)
CMStringW str(buddy["state"].as_mstring());
setDword(hContact, "Status", StatusFromString(str));
- Json2string(hContact, buddy, "friendly", "Nick");
+ const JSONNode &var = buddy["friendly"];
+ if (var)
+ setWString(hContact, "Nick", var.as_mstring());
+
Json2string(hContact, buddy, "emailId", "Email");
Json2string(hContact, buddy, "cellNumber", "Cellular");
Json2string(hContact, buddy, "phoneNumber", "Phone");