diff options
Diffstat (limited to 'protocols/WhatsApp/src')
-rw-r--r-- | protocols/WhatsApp/src/chat.cpp | 10 | ||||
-rw-r--r-- | protocols/WhatsApp/src/proto.cpp | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/protocols/WhatsApp/src/chat.cpp b/protocols/WhatsApp/src/chat.cpp index 8f4469af3e..68ccac9a58 100644 --- a/protocols/WhatsApp/src/chat.cpp +++ b/protocols/WhatsApp/src/chat.cpp @@ -25,7 +25,7 @@ INT_PTR __cdecl WhatsAppProto::OnCreateGroup(WPARAM wParam, LPARAM lParam) es.szModuleName = m_szModuleName;
if (EnterString(&es)) {
if (isOnline()) {
- std::string groupName(ptrA(mir_utf8encodeT(es.ptszResult)));
+ std::string groupName(T2Utf(es.ptszResult));
m_pConnection->sendCreateGroupChat(groupName);
}
mir_free(es.ptszResult);
@@ -43,7 +43,7 @@ int WhatsAppProto::onGroupChatEvent(WPARAM wParam, LPARAM lParam) if (mir_strcmp(gch->pDest->pszModule, m_szModuleName))
return 0;
- std::string chat_id(ptrA(mir_utf8encodeT(gch->pDest->ptszID)));
+ std::string chat_id(T2Utf(gch->pDest->ptszID));
WAChatInfo *pInfo = SafeGetChat(chat_id);
if (pInfo == NULL)
return 0;
@@ -59,7 +59,7 @@ int WhatsAppProto::onGroupChatEvent(WPARAM wParam, LPARAM lParam) case GC_USER_MESSAGE:
if (isOnline()) {
- std::string msg(ptrA(mir_utf8encodeT(gch->ptszText)));
+ std::string msg(T2Utf(gch->ptszText));
try {
int msgId = GetSerial();
@@ -156,8 +156,8 @@ void WhatsAppProto::EditChatSubject(WAChatInfo *pInfo) es.caption = title;
es.szDataPrefix = "setSubject_";
if (EnterString(&es)) {
- ptrA gjid(mir_utf8encodeT(pInfo->tszJid));
- ptrA gsubject(mir_utf8encodeT(es.ptszResult));
+ T2Utf gjid(pInfo->tszJid);
+ T2Utf gsubject(es.ptszResult);
m_pConnection->sendSetNewSubject(std::string(gjid), std::string(gsubject));
mir_free(es.ptszResult);
}
diff --git a/protocols/WhatsApp/src/proto.cpp b/protocols/WhatsApp/src/proto.cpp index 2bf2bd88db..b594ad63fd 100644 --- a/protocols/WhatsApp/src/proto.cpp +++ b/protocols/WhatsApp/src/proto.cpp @@ -168,7 +168,7 @@ MCONTACT WhatsAppProto::AddToList(int flags, PROTOSEARCHRESULT* psr) if (psr->id == NULL)
return NULL;
- std::string phone(ptrA(mir_utf8encodeT(psr->id)));
+ std::string phone(T2Utf(psr->id));
std::string jid(phone + "@s.whatsapp.net");
MCONTACT hContact = AddToContactList(jid, phone.c_str());
|