summaryrefslogtreecommitdiff
path: root/protocols/Facebook/src/server.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-02-05 13:16:30 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-02-05 13:16:30 +0300
commit7aaec682eb08d6365d1b0d37271f61ea8d83316b (patch)
tree35cf8bd63b4b590f2bea73588f596191446b7727 /protocols/Facebook/src/server.cpp
parent716da0a2c8d8907e3b64813d08944148d99d472c (diff)
Facebook: code cleaning
Diffstat (limited to 'protocols/Facebook/src/server.cpp')
-rw-r--r--protocols/Facebook/src/server.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/protocols/Facebook/src/server.cpp b/protocols/Facebook/src/server.cpp
index 9d65b4c3d0..f9d2eb5b2f 100644
--- a/protocols/Facebook/src/server.cpp
+++ b/protocols/Facebook/src/server.cpp
@@ -34,7 +34,8 @@ void FacebookProto::OnLoggedIn()
{
m_mid = 0;
- MqttPublish("/foreground_state", "{\"foreground\":true, \"keepalive_timeout\":60}");
+ JSONNode root; root << BOOL_PARAM("foreground", true) << INT_PARAM("keepalive_timeout", 60);
+ MqttPublish("/foreground_state", root);
MqttSubscribe("/inbox", "/mercury", "/messaging_events", "/orca_presence", "/orca_typing_notifications", "/pp", "/t_ms", "/t_p", "/t_rtc", "/webrtc", "/webrtc_response", 0);
MqttUnsubscribe("/orca_message_notifications", 0);
@@ -362,7 +363,7 @@ int FacebookProto::OnMarkedRead(WPARAM, LPARAM hDbEvent)
root << CHAR_PARAM("threadFbId", getMStringA(hContact, DBKEY_ID));
else
root << CHAR_PARAM("otherUserFbId", getMStringA(hContact, DBKEY_ID));
- MqttPublish("/mark_thread", root.write().c_str());
+ MqttPublish("/mark_thread", root);
return 0;
}