From 390d3ecc13780511a2416eb4eb82a14a06516945 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 27 Nov 2023 21:04:41 +0300 Subject: =?UTF-8?q?fixes=20#3810=20(ICQ:=20=D0=BD=D0=B5=D0=B2=D0=B5=D1=80?= =?UTF-8?q?=D0=BD=D0=BE=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=D0=B5=D1=82?= =?UTF-8?q?=20Last=20seen=20=D0=B2=20user=20details)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/ICQ-WIM/src/server.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'protocols/ICQ-WIM/src/server.cpp') diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp index cc63593a3a..deb86738ec 100644 --- a/protocols/ICQ-WIM/src/server.cpp +++ b/protocols/ICQ-WIM/src/server.cpp @@ -417,8 +417,13 @@ MCONTACT CIcqProto::ParseBuddyInfo(const JSONNode &buddy, MCONTACT hContact, boo // we shall not remove existing phone number anyhow Json2string(hContact, buddy, "phoneNumber", DB_KEY_PHONE, true); + int onlineTime = buddy["onlineTime"].as_int(); + if (onlineTime) + setDword(hContact, DB_KEY_ONLINETS, time(0) - onlineTime); + else + delSetting(hContact, DB_KEY_ONLINETS); + Json2int(hContact, buddy, "official", "Official", bIsPartial); - Json2int(hContact, buddy, "onlineTime", DB_KEY_ONLINETS, bIsPartial); Json2int(hContact, buddy, "idleTime", "IdleTS", bIsPartial); Json2int(hContact, buddy, "memberSince", DB_KEY_MEMBERSINCE, bIsPartial); -- cgit v1.2.3