diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2013-07-04 05:00:03 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2013-07-04 05:00:03 +0000 |
commit | 2f6035a86d42b71950b2090559d0eb29c593137c (patch) | |
tree | 8d791f18ca8373e470c1cb71c2b3dea648bc2cac /protocols/Skype/src/skype_messages.cpp | |
parent | 2726a957371d1f40ebf5a83c1434f70311a0f678 (diff) |
Skype: some fix in file transfer and blocked list dialog
git-svn-id: http://svn.miranda-ng.org/main/trunk@5226 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_messages.cpp')
-rw-r--r-- | protocols/Skype/src/skype_messages.cpp | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/protocols/Skype/src/skype_messages.cpp b/protocols/Skype/src/skype_messages.cpp index 5b5bcad1bf..97a830b0b5 100644 --- a/protocols/Skype/src/skype_messages.cpp +++ b/protocols/Skype/src/skype_messages.cpp @@ -37,24 +37,23 @@ void CSkypeProto::OnMessageReceived(const ConversationRef &conversation, const M {
SEString data;
- CMessage::TYPE messageType;
+ Message::TYPE messageType;
message->GetPropType(messageType);
uint timestamp;
message->GetPropTimestamp(timestamp);
- CMessage::CONSUMPTION_STATUS status;
+ Message::CONSUMPTION_STATUS status;
message->GetPropConsumptionStatus(status);
message->GetPropBodyXml(data);
char *text = CSkypeProto::RemoveHtml(data);
+ ContactRef author;
message->GetPropAuthor(data);
-
- CContact::Ref author;
this->GetContact(data, author);
- HANDLE hContact = this->AddContact(author);
+ HANDLE hContact = this->AddContact(author, true);
this->UserIsTyping(hContact, PROTOTYPE_SELFTYPING_OFF);
SEBinary guid;
@@ -102,10 +101,9 @@ void CSkypeProto::OnMessageSent(const ConversationRef &conversation, const Messa conversation->GetParticipants(participants, CConversation::OTHER_CONSUMERS);
participants[0]->GetPropIdentity(data);
- CContact::Ref receiver;
- this->GetContact(data, receiver);
+ ptrW sid(::mir_utf8decodeW(data));
- HANDLE hContact = this->AddContact(receiver);
+ HANDLE hContact = this->GetContactBySid(sid);
this->SendBroadcast(
hContact,
ACKTYPE_MESSAGE,
@@ -215,11 +213,11 @@ void CSkypeProto::SyncMessageHystory(const ConversationRef &conversation, const {
conversation->SetConsumedHorizon(timestamp);
MessageRefs oldMessages, newMessages;
- conversation->GetLastMessages(oldMessages, newMessages, timestamp); - for (size_t i = 0; i < oldMessages.size(); i++) - this->OnMessageEvent(conversation, oldMessages[i]); - for (size_t i = 0; i < newMessages.size(); i++) - this->OnMessageEvent(conversation, newMessages[i]); + conversation->GetLastMessages(oldMessages, newMessages, timestamp);
+ for (size_t i = 0; i < oldMessages.size(); i++)
+ this->OnMessageEvent(conversation, oldMessages[i]);
+ for (size_t i = 0; i < newMessages.size(); i++)
+ this->OnMessageEvent(conversation, newMessages[i]);
conversation->SetConsumedHorizon(time(NULL));
}
}
@@ -242,9 +240,9 @@ void CSkypeProto::SyncHistoryCommand(HANDLE hContact, time_t timestamp) if (conversation)
{
- this->SyncMessageHystory(conversation, timestamp); - CSkypeProto::ShowNotification(TranslateT("history synchronization"), TranslateT("Done!"), MB_ICONINFORMATION, hContact); - } + this->SyncMessageHystory(conversation, timestamp);
+ CSkypeProto::ShowNotification(TranslateT("history synchronization"), TranslateT("Done!"), MB_ICONINFORMATION, hContact);
+ }
}
}
@@ -309,8 +307,8 @@ int CSkypeProto::SyncAllTimeHistoryCommand(WPARAM wParam, LPARAM lParam) {
uint timestamp;
conversation->GetPropCreationTimestamp(timestamp);
- this->SyncMessageHystory(conversation, timestamp); - CSkypeProto::ShowNotification(TranslateT("history synchronization"), TranslateT("Done!"), MB_ICONINFORMATION, hContact); + this->SyncMessageHystory(conversation, timestamp);
+ CSkypeProto::ShowNotification(TranslateT("history synchronization"), TranslateT("Done!"), MB_ICONINFORMATION, hContact);
}
}
return 0;
|