diff options
author | dequis <dx@dxzone.com.ar> | 2016-05-16 02:12:20 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2016-05-16 02:12:20 -0300 |
commit | 0877cf236761eaefcd61b8fd5722272ffe1f12c5 (patch) | |
tree | 1aed991447501919fe707b314608b4bbe4b72950 | |
parent | 9ce0a4fd28acaa249b7a4f2f132416dd8448e586 (diff) | |
download | bitlbee-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.
-rw-r--r-- | facebook/facebook-api.c | 1 |
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_"; |