oxen-io / oxen-storage-server

Storage server for Oxen Service Nodes
MIT License
29 stars 50 forks source link

Add "outbox" & unrevocable-retrieval namespaces #485

Closed jagerman closed 9 months ago

jagerman commented 12 months ago

Outbox namespaces are single-message namespaces (negative 2n+1 values, e.g. -1, -21, -41, ...) that can only be stored in by the account owner, but can be retrieved by anyone. Additionally they are auto-clearing of existing messages: storing to such a namespace automatically removes all existing messages. The intention is to (eventually) use this to allow Session to publish account info for a Session ID in a single place rather than having to attach it to every sent message, but it may also have other (currently unforeseen) uses in the future.

This would allow us to put all of a user's profile data into one place and could optionally be encrypted or not to control whether the info can be viewed by anyone (unencrypted) or only after receiving a message (encrypted).

This commit also adds namespaces where subaccount revocation is ignored for retrieval: these are aimed at new group support to allow an admin to leave behind a message (officially quite maybe called a UrBannedLol meta-message) for a removed user who has had their subaccount token revoked so that the removed user can still get an authoritative indicator of the removal without having to rely on storage server authentication failure codes (which might not be entirely reliable) or more difficult-to-send-and-coordinate DMs.