AnthyG / ThunderWave

A chat for ZeroNet
http://127.0.0.1:43110/1CWkZv7fQAKxTVjZVrLZ8VHcrN6YGGcdky/
15 stars 3 forks source link

Add system to directly open private chat with a user through URL #97

Closed AnthyG closed 6 years ago

AnthyG commented 6 years ago

This could enable a ZeroMail-like experience/ link, that could be shared everywhere to open up the private chat with that user.

If the zite then detects that the said URL is set (e.g. ?PC=[USER_CERT_ID], then the following code just needs to be executed, and the chat is open:

page.addPrivateContact(cert_user_id, page.genContactsList)
page.loadPrivateMessages('selected user', true, cert_user_id)
$('#private_recipient').val(cert_user_id)
AnthyG commented 6 years ago

Added with commit b1d9fec24eb1cf6c2aa100216d4ce639423c2a9a