aboutsummaryrefslogtreecommitdiffstats
path: root/facebook/facebook-api.c
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2016-05-16 02:12:20 -0300
committerdequis <dx@dxzone.com.ar>2016-05-16 02:12:20 -0300
commit0877cf236761eaefcd61b8fd5722272ffe1f12c5 (patch)
tree1aed991447501919fe707b314608b4bbe4b72950 /facebook/facebook-api.c
parent9ce0a4fd28acaa249b7a4f2f132416dd8448e586 (diff)
downloadbitlbee-facebook-0877cf236761eaefcd61b8fd5722272ffe1f12c5.tar.gz
bitlbee-facebook-0877cf236761eaefcd61b8fd5722272ffe1f12c5.tar.bz2
bitlbee-facebook-0877cf236761eaefcd61b8fd5722272ffe1f12c5.tar.xz
Store sent message id in lastmid, to deduplicate echoed messages
Mostly fixes bug #76 This is crappy and error prone, just like the rest of the duplicate message handling code. It works, but it's going to get some echoes now and then, particularly in quick moving groupchats. I'm pretty sure this is a bug in the server, but the official clients have much more elaborate deduplication built-in, so they won't notice.
Diffstat (limited to 'facebook/facebook-api.c')
-rw-r--r--facebook/facebook-api.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/facebook/facebook-api.c b/facebook/facebook-api.c
index 3ddfa70..c8e5e30 100644
--- a/facebook/facebook-api.c
+++ b/facebook/facebook-api.c
@@ -2115,6 +2115,7 @@ fb_api_message_send(FbApi *api, FbApiMessage *msg)
JsonBuilder *bldr;
mid = FB_API_MSGID(g_get_real_time() / 1000, g_random_int());
+ priv->lastmid = mid;
if (msg->tid != 0) {
tpfx = "tfbid_";