From b58bd0a705dba9a32e4db1420e2d615c6ee6bd41 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 10 Jan 2025 15:28:20 +0300 Subject: =?UTF-8?q?fixes=20#4830=20(SkypeWeb:=20=D1=80=D0=B5=D0=B4=D0=B0?= =?UTF-8?q?=D0=BA=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=BD=D0=BE?= =?UTF-8?q?=D0=B5=20=D1=81=D0=B2=D0=BE=D1=91=20=D1=81=D0=BE=D0=BE=D0=B1?= =?UTF-8?q?=D1=89=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BF=D1=80=D0=B8=D1=85=D0=BE?= =?UTF-8?q?=D0=B4=D0=B8=D1=82=20=D0=BA=D0=B0=D0=BA=20=D0=BD=D0=BE=D0=B2?= =?UTF-8?q?=D0=BE=D0=B5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/SkypeWeb/src/skype_utils.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'protocols/SkypeWeb/src/skype_utils.cpp') diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp index 41593b0a97..26cf39e7bb 100644 --- a/protocols/SkypeWeb/src/skype_utils.cpp +++ b/protocols/SkypeWeb/src/skype_utils.cpp @@ -661,6 +661,23 @@ bool CSkypeProto::IsFileExists(std::wstring path) return _waccess(path.c_str(), 0) == 0; } +int64_t getRandomId() +{ + int64_t ret; + Utils_GetRandom(&ret, sizeof(ret)); + if (ret < 0) + ret = -ret; + return ret; +} + +CMStringA getMessageId(const JSONNode &node) +{ + CMStringA ret(node["skypeeditedid"].as_mstring()); + if (ret.IsEmpty()) + ret = node["clientmessageid"].as_mstring(); + return ret; +} + const char* GetSkypeNick(const char *szSkypeId) { if (auto *p = strchr(szSkypeId, ':')) -- cgit v1.2.3