bitlbee/bitlbee-facebook

mark_read available causes repeated messages

Opened this issue · 6 comments

I use ssh, irssi, tmux_away, and ZNC to connect to bitlbee. Since I don't actually use the app, I set mark_read available. However, this causes many repeated messages, as in the following example:

-!- You have been marked as being away
<someone> hi
<someone> where are you?
-!- You are no longer marked as being away
<someone> [22:52:30] hi
<someone> [22:53:41] where are you?

etc.

seems to be fixed after restarting bitlbee

Uhh, you sure about that?

no

I suspect (but have not attempted to verify) that this can be caused by using the "Turn Off Chat" function on the Facebook website, then restarting bitlbee.

There's also the fact that the current away implementation works by silently restarting the mqtt connection in away mode. Upgrading to a newer protocol will remove that requirement and possibly solve this, although I'm not sure what the root cause is.

I originally meant to report that going away again (after repeated message) then un-away sends another repeated message. that issue seems to have been fixed, but there is still the issue that mark_read available + show_unread gives bad results to client. I think a workaround would be to first mark all messages read before un-awaying, then they will not be re-delivered.