Sending encrypted messages. Revealing some weird behavior, but it's working.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4438 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2023-09-01 01:34:01 +00:00
parent c8029388c9
commit 8f63bcbfbf
3 changed files with 80 additions and 9 deletions

View File

@ -88,6 +88,9 @@ tfrpc.register(function apps() {
tfrpc.register(async function try_decrypt(id, content) {
return await ssb.privateMessageDecrypt(id, content);
});
tfrpc.register(async function encrypt(id, recipients, content) {
return await ssb.privateMessageEncrypt(id, recipients, content);
});
ssb.addEventListener('broadcasts', async function() {
await tfrpc.rpc.set('broadcasts', await ssb.getBroadcasts());
});