hannesm / jackline

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

rethink `remove` (and `info`) #78

Open hannesm opened 9 years ago

hannesm commented 9 years ago

if /add foo does add something, /remove on foo does nothing visible. /info on foo also doesn't show any difference. (also: add should validate the given string to be a (valid?) jid, otherwise server might be confused)

reason is that /add adds to roster, but /info doesn't contain any hints whether this user is in your roster or local only.

also, /remove doesn't take a jid argument (and does only do a Roster.put, which if successful prints a message) -- but doesn't remove the local user thingy...

this also gives rise to local-only commands: ladd, lremove to avoid saving data (your social network) on the server

hannesm commented 9 years ago

can we cancel a subscription: none (pending)? (need to look through XMPP RFC and test against servers..)

hannesm commented 9 years ago

(related to #22)

infinity0 commented 8 years ago

Yeah, what is /remove actually supposed to do? I don't see the remote contact actually being removed... it doesn't disappear from the contacts list and next time I log in, it's still there.

hannesm commented 8 years ago

/remove does a Roster.put ~remove here, which the XMPP server upon successful completion should sent a roster update with subscription = Remove (handled here).

Thus, /remove requires a connection to the server, and it needs to be well-behaved. I just tested this between jabber.ccc.de and jabber.berlin.ccc.de, and it worked..