summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/FacebookRM/src/communication.cpp3
-rw-r--r--protocols/FacebookRM/src/db.h2
-rw-r--r--protocols/FacebookRM/src/proto.cpp8
3 files changed, 7 insertions, 6 deletions
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp
index fde25c036f..342845436f 100644
--- a/protocols/FacebookRM/src/communication.cpp
+++ b/protocols/FacebookRM/src/communication.cpp
@@ -691,8 +691,9 @@ void facebook_client::erase_reader(MCONTACT hContact)
if (parent->isChatRoom(hContact)) {
parent->delSetting(hContact, FACEBOOK_KEY_MESSAGE_READERS);
}
+ if (!ServiceExists("MessageState/DummyService"))
+ parent->delSetting(hContact, FACEBOOK_KEY_MESSAGE_READ);
- parent->delSetting(hContact, FACEBOOK_KEY_MESSAGE_READ);
readers.erase(hContact);
CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hContact, NULL);
}
diff --git a/protocols/FacebookRM/src/db.h b/protocols/FacebookRM/src/db.h
index c261ecbbf5..3e1a0ac804 100644
--- a/protocols/FacebookRM/src/db.h
+++ b/protocols/FacebookRM/src/db.h
@@ -37,7 +37,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define FACEBOOK_KEY_DELETED "DeletedTS"
#define FACEBOOK_KEY_CONTACT_TYPE "ContactType"
#define FACEBOOK_KEY_MESSAGE_ID "LastMessageId"
-#define FACEBOOK_KEY_MESSAGE_READ "MessageRead"
+#define FACEBOOK_KEY_MESSAGE_READ "LastMsgReadTime"
#define FACEBOOK_KEY_MESSAGE_READERS "MessageReaders"
// Contact and account DB keys
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp
index a7184d4ff0..1170c298be 100644
--- a/protocols/FacebookRM/src/proto.cpp
+++ b/protocols/FacebookRM/src/proto.cpp
@@ -170,7 +170,7 @@ DWORD_PTR FacebookProto::GetCaps(int type, MCONTACT)
else
return 0;
case PFLAGNUM_4:
- return PF4_NOCUSTOMAUTH | PF4_FORCEADDED | PF4_AVATARS | PF4_SUPPORTTYPING | PF4_NOAUTHDENYREASON | PF4_IMSENDOFFLINE;
+ return PF4_NOCUSTOMAUTH | PF4_FORCEADDED | PF4_AVATARS | PF4_SUPPORTTYPING | PF4_NOAUTHDENYREASON | PF4_IMSENDOFFLINE | PF4_READNOTIFY;
case PFLAGNUM_5:
return PF2_ONTHEPHONE;
case PFLAG_MAXLENOFMESSAGE:
@@ -1135,9 +1135,9 @@ void FacebookProto::MessageRead(MCONTACT hContact)
// Load readers names
ptrT treaders(getTStringA(hContact, FACEBOOK_KEY_MESSAGE_READERS));
mir_sntprintf(st.tszText, SIZEOF(st.tszText), TranslateT("Message read: %s by %s"), ttime, treaders ? treaders : _T("???"));
- } else {
+ CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hContact, (LPARAM)&st);
+ } else if (!ServiceExists("MessageState/DummyService")){
mir_sntprintf(st.tszText, SIZEOF(st.tszText), TranslateT("Message read: %s"), ttime);
+ CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hContact, (LPARAM)&st);
}
-
- CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hContact, (LPARAM)&st);
}