summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-07-29 18:56:14 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-07-29 18:56:14 +0300
commit26686176cf3c08411c91dbb25f3973ab2a874722 (patch)
tree75b9dce899dd389f2798f538684ecf8d30cd61ff /protocols
parent5984ec588ef9ff5182d6d76d1f0ef723d799c5c2 (diff)
ICQ: remote file URL aesthetics
Diffstat (limited to 'protocols')
-rw-r--r--protocols/ICQ-WIM/src/server.cpp5
-rw-r--r--protocols/ICQ-WIM/src/utils.cpp6
2 files changed, 6 insertions, 5 deletions
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp
index 8c58ed0c80..9fea03f48e 100644
--- a/protocols/ICQ-WIM/src/server.cpp
+++ b/protocols/ICQ-WIM/src/server.cpp
@@ -177,6 +177,11 @@ IcqFileInfo *CIcqProto::RetrieveFileInfo(MCONTACT hContact, const CMStringW &wsz
bool CIcqProto::CheckFile(MCONTACT hContact, CMStringW &wszText, IcqFileInfo *&pFileInfo)
{
pFileInfo = nullptr;
+
+ int idx = wszText.Find(' ');
+ if (idx != -1)
+ wszText.Truncate(idx);
+
CMStringW wszUrl(fileText2url(wszText));
// is it already downloaded sticker?
diff --git a/protocols/ICQ-WIM/src/utils.cpp b/protocols/ICQ-WIM/src/utils.cpp
index fbe99c6ad6..ffaccc4747 100644
--- a/protocols/ICQ-WIM/src/utils.cpp
+++ b/protocols/ICQ-WIM/src/utils.cpp
@@ -247,11 +247,7 @@ void CIcqProto::setId(MCONTACT hContact, const char *szSetting, __int64 iValue)
CMStringW fileText2url(const CMStringW &wszText)
{
- CMStringW wszUrl(wszText.Mid(26));
- int idx = wszUrl.Find(' ');
- if (idx != -1)
- wszUrl.Truncate(idx);
- return wszUrl;
+ return wszText.Mid(26);
}
/////////////////////////////////////////////////////////////////////////////////////////