Decrypt messages in the ssb app.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4299 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2023-05-17 14:10:49 +00:00
parent 5b8bdbb3e4
commit 10d4ae7dcc
3 changed files with 23 additions and 3 deletions

View File

@ -85,6 +85,9 @@ tfrpc.register(async function store_message(message) {
tfrpc.register(function apps() {
return core.apps();
});
tfrpc.register(async function try_decrypt(id, content) {
return await ssb.privateMessageDecrypt(id, content);
});
ssb.addEventListener('broadcasts', async function() {
await tfrpc.rpc.set('broadcasts', await ssb.getBroadcasts());
});