diff options
author | George Hazan <ghazan@miranda.im> | 2019-12-26 18:00:44 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-12-26 18:00:44 +0300 |
commit | d6379f7422784b1abe4ba15b5fa85dc16f066df8 (patch) | |
tree | d47d735e56381d3dd0a14f0ea0712a0ab1b4d747 /protocols/Facebook/src | |
parent | 8d1513ec000a6d0a74e95134612b5ea726ff5d83 (diff) |
Facebook: sending UTF messages
Diffstat (limited to 'protocols/Facebook/src')
-rw-r--r-- | protocols/Facebook/src/proto.cpp | 12 | ||||
-rw-r--r-- | protocols/Facebook/src/proto.h | 2 |
2 files changed, 12 insertions, 2 deletions
diff --git a/protocols/Facebook/src/proto.cpp b/protocols/Facebook/src/proto.cpp index 66e35e4744..599212932a 100644 --- a/protocols/Facebook/src/proto.cpp +++ b/protocols/Facebook/src/proto.cpp @@ -202,7 +202,17 @@ int FacebookProto::SetStatus(int iNewStatus) } ////////////////////////////////////////////////////////////////////////////// -// EVENTS + +int FacebookProto::UserIsTyping(MCONTACT hContact, int type) +{ + ptrA id(getStringA(hContact, DBKEY_ID)); + CMStringA json(FORMAT, "{\"state\":%d, \"to\":\"%s\"}", type == PROTOTYPE_SELFTYPING_ON, id.get()); + MqttPublish("/typing", json); + return 0; +} + +////////////////////////////////////////////////////////////////////////////// +// Services INT_PTR FacebookProto::SvcCreateAccMgrUI(WPARAM, LPARAM lParam) { diff --git a/protocols/Facebook/src/proto.h b/protocols/Facebook/src/proto.h index 219e569625..2eac313a05 100644 --- a/protocols/Facebook/src/proto.h +++ b/protocols/Facebook/src/proto.h @@ -421,8 +421,8 @@ public: void OnShutdown() override; INT_PTR GetCaps(int type, MCONTACT hContact) override; - int SetStatus(int iNewStatus) override; + int UserIsTyping(MCONTACT hContact, int type) override; //////////////////////////////////////////////////////////////////////////////////////// // Events |