summaryrefslogtreecommitdiff
path: root/protocols/ICQ-WIM/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-09-25 12:47:10 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-09-25 12:47:10 +0300
commit9ffba2f6e7f9961d4211960bd8619ff06f4dba1e (patch)
treedaf938911bed7b0a16134c13e90674d105326f08 /protocols/ICQ-WIM/src
parent30387a749280e955af923d4a06c325651fe964ac (diff)
fixes #2073 (ICQ-WIM: a contact cannot be moved correctly from root to any group)
Diffstat (limited to 'protocols/ICQ-WIM/src')
-rw-r--r--protocols/ICQ-WIM/src/proto.cpp2
-rw-r--r--protocols/ICQ-WIM/src/server.cpp8
2 files changed, 7 insertions, 3 deletions
diff --git a/protocols/ICQ-WIM/src/proto.cpp b/protocols/ICQ-WIM/src/proto.cpp
index 63a3a553e2..8001693259 100644
--- a/protocols/ICQ-WIM/src/proto.cpp
+++ b/protocols/ICQ-WIM/src/proto.cpp
@@ -242,7 +242,7 @@ public:
if (cmd == 1) { // rename
ENTER_STRING es = {};
es.cbSize = sizeof(es);
- es.type = ES_MULTILINE;
+ es.type = ESF_MULTILINE;
es.caption = TranslateT("Enter new group name");
if (!EnterString(&es))
return;
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp
index 2bfae8c6f1..13b868c525 100644
--- a/protocols/ICQ-WIM/src/server.cpp
+++ b/protocols/ICQ-WIM/src/server.cpp
@@ -169,8 +169,12 @@ void CIcqProto::ConnectionFailed(int iReason, int iErrorCode)
void CIcqProto::MoveContactToGroup(MCONTACT hContact, const wchar_t *pwszGroup, const wchar_t *pwszNewGroup)
{
- Push(new AsyncHttpRequest(CONN_MAIN, REQUEST_GET, ICQ_API_SERVER "/buddylist/moveBuddy")
- << AIMSID(this) << WCHAR_PARAM("buddy", GetUserId(hContact)) << GROUP_PARAM("group", pwszGroup) << GROUP_PARAM("newGroup", pwszNewGroup));
+ auto *pReq = new AsyncHttpRequest(CONN_MAIN, REQUEST_GET, ICQ_API_SERVER "/buddylist/moveBuddy") << AIMSID(this) << WCHAR_PARAM("buddy", GetUserId(hContact));
+ if (mir_wstrlen(pwszGroup))
+ pReq << GROUP_PARAM("group", pwszGroup);
+ if (mir_wstrlen(pwszNewGroup))
+ pReq << GROUP_PARAM("newGroup", pwszNewGroup);
+ Push(pReq);
}
/////////////////////////////////////////////////////////////////////////////////////////