hannesm / jackline

minimalistic secure XMPP client in OCaml
BSD 2-Clause "Simplified" License
250 stars 20 forks source link

disposal of sessions and otr sessions #13

Closed hannesm closed 9 years ago

hannesm commented 9 years ago

some clients (such as mcabber) append a random number/string to its resource on reconnect, but carry over the otr session... how to handle this?

also, when to dispose a session once the contact is unavailable? obviously we'd like to reuse the otr session ('coz we didn't send/received a finished message)

hannesm commented 9 years ago

pidgin tends to generate a "random" resource containing only numbers, others use some common prefix (such as gmail.) with random hex-encoded suffix. the strategy in my head is atm to compare resource with ignoring those random chars... should work for most cases (and obviously lead to unintuitive bugs if someone decides to name one resource c0ffee, and another 1337)