diff options
Diffstat (limited to 'protocols/SkypeWeb/src')
-rw-r--r-- | protocols/SkypeWeb/src/skype_db.cpp | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_history_sync.cpp | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_messages.cpp | 17 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.cpp | 5 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.h | 3 |
5 files changed, 10 insertions, 19 deletions
diff --git a/protocols/SkypeWeb/src/skype_db.cpp b/protocols/SkypeWeb/src/skype_db.cpp index af8abcda5a..89235f6e4b 100644 --- a/protocols/SkypeWeb/src/skype_db.cpp +++ b/protocols/SkypeWeb/src/skype_db.cpp @@ -55,7 +55,7 @@ MEVENT CSkypeProto::AddDbEvent(uint16_t type, MCONTACT hContact, uint32_t timest return db_event_add(hContact, &dbei);
}
-void CSkypeProto::EditEvent(MCONTACT hContact, MEVENT hEvent, const CMStringW &szContent, time_t edit_time)
+void CSkypeProto::EditEvent(MEVENT hEvent, const CMStringW &szContent, time_t edit_time)
{
mir_cslock lck(m_AppendMessageLock);
diff --git a/protocols/SkypeWeb/src/skype_history_sync.cpp b/protocols/SkypeWeb/src/skype_history_sync.cpp index 0b2a060d03..b10897b0d3 100644 --- a/protocols/SkypeWeb/src/skype_history_sync.cpp +++ b/protocols/SkypeWeb/src/skype_history_sync.cpp @@ -77,7 +77,7 @@ void CSkypeProto::OnGetServerHistory(NETLIBHTTPREQUEST *response, AsyncHttpReque CMStringW szMessage(messageType == "RichText" ? RemoveHtml(wszContent) : wszContent);
MEVENT dbevent = GetMessageFromDb(szMessageId);
if (isEdited && dbevent != NULL)
- EditEvent(hContact, dbevent, szMessage, timestamp);
+ EditEvent(dbevent, szMessage, timestamp);
else
AddDbEvent(emoteOffset == 0 ? EVENTTYPE_MESSAGE : SKYPE_DB_EVENT_TYPE_ACTION, hContact, timestamp, iFlags, szMessage.c_str()+emoteOffset, szMessageId);
}
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 = {};
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index b365b6a1ef..35b500a0a7 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -224,11 +224,6 @@ int CSkypeProto::GetInfo(MCONTACT hContact, int) return 0;
}
-int CSkypeProto::SendMsg(MCONTACT hContact, int flags, const char *msg)
-{
- return OnSendMessage(hContact, flags, msg);
-}
-
int CSkypeProto::SetStatus(int iNewStatus)
{
if (iNewStatus == m_iDesiredStatus)
diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h index 3bc4a5a6c2..9236c905c5 100644 --- a/protocols/SkypeWeb/src/skype_proto.h +++ b/protocols/SkypeWeb/src/skype_proto.h @@ -265,9 +265,8 @@ private: MEVENT GetMessageFromDb(const char *messageId);
MEVENT AddDbEvent(uint16_t type, MCONTACT hContact, uint32_t timestamp, uint32_t flags, const CMStringW &content, const CMStringA &msgId);
- void EditEvent(MCONTACT hContact, MEVENT hEvent, const CMStringW &content, time_t edit_time);
+ void EditEvent(MEVENT hEvent, const CMStringW &content, time_t edit_time);
- int OnSendMessage(MCONTACT hContact, int flags, const char *message);
int __cdecl OnPreCreateMessage(WPARAM, LPARAM lParam);
void MarkMessagesRead(MCONTACT hContact, MEVENT hDbEvent);
|