MaladaN/MaladaN-Messenger-Client

Message Routine between Users

ValliereMagic opened this issue · 1 comments

Step 1.) User picks another user to send a message to. This must be the actual username not the initial hash.

Step 2.) The messenger then contacts the server, and sees if the username specified actually belongs to another user.

Step 3.) If the user does actually exist, and the user requesting has a valid session, a ServerResponsePreKeyBundle is returned to the client. If not, the client is notified that the user does not exist by sending an encryptedUserExists object that notifies the client the username does not belong to a client.

Step 4.) After the client receives the required preKeyBundle, the user will be added to the conversations listView, and the client will be able to send a message to them.

Object basic contents:

a String encrypted with the recipient's info, that contains the message sender's username. (serialized in a byte[])
a String encrypted with the server info, that contains the recipient username. (serialized in a byte[])
the encrypted message. (encrypted with the recipient info) (serialized in a byte[])

Original:

img_20170515_184906

completed and working