bitlbee / bitlbee-facebook

Facebook protocol plugin for BitlBee
GNU General Public License v2.0
279 stars 49 forks source link

Document the unknowns #149

Closed valga closed 6 years ago

valga commented 7 years ago

I was reversing the FBNS implementation recently and I used this repo as a starting point. So I want to share some info in return.

Also, here are some thoughts:

  1. MQTT session ID is a device uptime in milliseconds, so it is not persistent as it changes with every session. Not sure if it changes when network connection was reset.
  2. New clients have FB_CP_USE_ENUM_TOPIC capability enabled to save some bandwidth, so for example /messenger_sync_create_queue becomes 23 (as a string) and vice versa.
dequis commented 7 years ago

Thanks! I noticed the numeric topics in newer versions, they are a pain in the ass. Wonder how long we can get away with not using them, if it's just an optional capability.

valga commented 7 years ago

Numeric topics are easy, because you can find a map for all of them in one place. And then you just convert them on the fly when doing publish or receive.

Also, as I said, it is controlled by client capabilities. So you can switch them on and off (for now at least).

dequis commented 6 years ago

Almost forgot about this one. Thanks!