diff options
author | George Hazan <ghazan@miranda.im> | 2019-12-24 20:18:41 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-12-24 20:18:41 +0300 |
commit | 15357b4ba28cdc9085896da1855c428e1eb7c5e8 (patch) | |
tree | 1eeaebe14243a8778c7ce9f92f54223479c3f68c /protocols/Facebook | |
parent | 296290304c3f922be6905c2be4131baeafc46342 (diff) |
fix for minor glitches
Diffstat (limited to 'protocols/Facebook')
-rw-r--r-- | protocols/Facebook/src/mqtt.cpp | 8 | ||||
-rw-r--r-- | protocols/Facebook/src/server.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/protocols/Facebook/src/mqtt.cpp b/protocols/Facebook/src/mqtt.cpp index 92370dc971..f23ee010c8 100644 --- a/protocols/Facebook/src/mqtt.cpp +++ b/protocols/Facebook/src/mqtt.cpp @@ -246,7 +246,7 @@ void FacebookProto::MqttLogin() void FacebookProto::MqttPing() { - MqttMessage payload(FB_MQTT_MESSAGE_TYPE_PINGREQ); + MqttMessage payload(FB_MQTT_MESSAGE_TYPE_PINGREQ, FB_MQTT_MESSAGE_FLAG_QOS1); MqttSend(payload); } @@ -257,7 +257,7 @@ void FacebookProto::MqttPublish(const char *topic, const char *value) size_t dataSize; mir_ptr<uint8_t> pData(doZip(strlen(value), value, dataSize)); - MqttMessage payload(FB_MQTT_MESSAGE_TYPE_PUBLISH, FB_MQTT_CONNECT_FLAG_QOS1); + MqttMessage payload(FB_MQTT_MESSAGE_TYPE_PUBLISH, FB_MQTT_MESSAGE_FLAG_QOS1); payload.writeStr(topic); payload.writeInt16(++m_mid); payload.writeBuf(pData, dataSize); @@ -268,7 +268,7 @@ void FacebookProto::MqttSubscribe(const char *topic, ...) { uint8_t zeroByte = 0; - MqttMessage payload(FB_MQTT_MESSAGE_TYPE_SUBSCRIBE, FB_MQTT_CONNECT_FLAG_QOS1); + MqttMessage payload(FB_MQTT_MESSAGE_TYPE_SUBSCRIBE, FB_MQTT_MESSAGE_FLAG_QOS1); payload.writeInt16(++m_mid); payload.writeStr(topic); payload << zeroByte; @@ -286,7 +286,7 @@ void FacebookProto::MqttSubscribe(const char *topic, ...) void FacebookProto::MqttUnsubscribe(const char *topic, ...) { - MqttMessage payload(FB_MQTT_MESSAGE_TYPE_UNSUBSCRIBE, FB_MQTT_CONNECT_FLAG_QOS1); + MqttMessage payload(FB_MQTT_MESSAGE_TYPE_UNSUBSCRIBE, FB_MQTT_MESSAGE_FLAG_QOS1); payload.writeInt16(++m_mid); payload.writeStr(topic); diff --git a/protocols/Facebook/src/server.cpp b/protocols/Facebook/src/server.cpp index 58b55fd942..7d48bd0ad3 100644 --- a/protocols/Facebook/src/server.cpp +++ b/protocols/Facebook/src/server.cpp @@ -28,7 +28,7 @@ void FacebookProto::OnLoggedIn() ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)m_iStatus, m_iDesiredStatus); m_iStatus = m_iDesiredStatus; - // MqttPublish("/foreground_state", "{\"foreground\":\"true\", \"keepalive_timeout\":\"60\"}"); + MqttPublish("/foreground_state", "{\"foreground\":true, \"keepalive_timeout\":60}"); 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); |