-
![](https://cdn.hzrd149.com/5ed3fe5df09a74e8c126831eac999364f9eb7624e2b86d521521b8021de20bdc.png)
@ hzrd149
2025-02-11 19:29:11
Next version of applesauce is going to make it really easy to modify inbox / outbox relays. there is now "addInboxRelay" and "addOutboxRelay" methods that can be used when modifying the 10002 event to modify the "r" tags. and it handles duplicates relays by updating them to "read" or "write"
and it won't touch anything else in the event, so if there are tags it does not recognize it will leave them
https://hzrd149.github.io/applesauce/typedoc/modules/applesauce_factory.Operations.html
This is all the code I wrote to add and remove outbox relays
https://cdn.hzrd149.com/143c0e0099ec0663e139a75ec03404cd387c6481b74745331134aa526c2f9251.webp
https://github.com/hzrd149/nsite-manager/blob/master/src/views/settings/account.tsx#L55-L81