diff options
author | George Hazan <george.hazan@gmail.com> | 2023-09-15 14:22:08 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-09-15 14:22:13 +0300 |
commit | 67382bca8cdfb020a56dbab3087233c3f1034426 (patch) | |
tree | d4cffadcf330cce5527c3b021fcf799f02c17c76 /protocols/SkypeWeb/src/skype_messages.cpp | |
parent | c400f5c17af4996eb2ecf0597e17eb25c17857d8 (diff) |
fixes #3674 (Реакция протоколов на отсылку в оффлайн)
Diffstat (limited to 'protocols/SkypeWeb/src/skype_messages.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_messages.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp index 59980fe873..25e15e73b1 100644 --- a/protocols/SkypeWeb/src/skype_messages.cpp +++ b/protocols/SkypeWeb/src/skype_messages.cpp @@ -20,12 +20,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* MESSAGE SENDING */
// outcoming message flow
-int CSkypeProto::OnSendMessage(MCONTACT hContact, int, const char *szMessage)
+int CSkypeProto::SendMsg(MCONTACT hContact, int, const char *szMessage)
{
- if (!IsOnline()) {
- ProtoBroadcastAck(hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, NULL, (LPARAM)TranslateT("You cannot send when you are offline."));
- return 0;
- }
+ if (!IsOnline())
+ return -1;
SendMessageParam *param = new SendMessageParam();
param->hContact = hContact;
@@ -41,10 +39,9 @@ int CSkypeProto::OnSendMessage(MCONTACT hContact, int, const char *szMessage) pReq = new SendMessageRequest(id, param->hMessage, szMessage);
pReq->pUserInfo = param;
PushRequest(pReq);
- {
- mir_cslock lck(m_lckOutMessagesList);
- m_OutMessages.insert((void*)param->hMessage);
- }
+
+ mir_cslock lck(m_lckOutMessagesList);
+ m_OutMessages.insert((void*)param->hMessage);
return param->hMessage;
}
@@ -134,7 +131,7 @@ void CSkypeProto::OnPrivateMessageEvent(const JSONNode &node) MEVENT hDbEvent = GetMessageFromDb(szMessageId);
if (bEdited && hDbEvent != NULL)
- EditEvent(hContact, hDbEvent, wszContent, timestamp);
+ EditEvent(hDbEvent, wszContent, timestamp);
else {
T2Utf szMsg(wszContent);
PROTORECVEVENT recv = {};
|