nichoth / hermes

Private by default social network
2 stars 0 forks source link

When you accept a friend request #85

Open nichoth opened 1 year ago

nichoth commented 1 year ago

Need to add to 'friends' list on the 'from' side. So alice requests friendship with bob, bob accepts. Alice needs to know about it, and update their own list.

Could send a message to our server like

{ to: 'abc123', body: 'encrypted string' }

But do we need to verify the author of the message? That would leak the friend graph, or add some trust between you and the server.

Our server currently doesn't make any distinction about who writes to it.


Can we make a friend request, then when it is accepted, the acceptor writes to a shared file that we read from?

nichoth commented 1 year ago

Another option

Could create a file that is shared by both parties.

Is this possible?

nichoth commented 1 year ago

Don't hide the social graph for the initial version. Can just write a message to the server like

{ type: 'accept', original-request: 'original-req', author: 'username', requester: 'username' }

here's how webnative does DNS lookup

you would call

lookupTxtRecord(domain: string)

with a domain in this format:

`_did.${username}.fission.name`

see the method accountDID here

nichoth commented 1 year ago

This does make me want to use an invitation system, so that we don't have people writing garbage messages and DOSing the DB.

That would be a record in the DB of invitation documents.