Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chainmail: archiving and persisting messages #821

Open
brandonfancher opened this issue Aug 27, 2024 · 0 comments
Open

Chainmail: archiving and persisting messages #821

brandonfancher opened this issue Aug 27, 2024 · 0 comments
Assignees
Labels
System app Related to system services and their apps/plugins

Comments

@brandonfancher
Copy link
Contributor

brandonfancher commented Aug 27, 2024

Emails are emitted as events. They aren't stored in state.

We will not support deleting email messages; user's can't delete messages that are kept in the event history. Instead, we will support archiving messages. There will be an archive event emitted. Queries via the plugin can join that information to the message.

Because messages are not stored in state and some nodes may opt to prune the event log, messages may disappear at any time. This is not always predictable. Yes, there may be archival nodes that pop up. On those nodes, the user can expect messages to persist. But if the user is not on an archival node, they may lose visibility into older/pruned messages.

For this reason, we will implement an aggressive 10-day auto-archive feature. Users can manually archive a message, but any message older than 10 days will not display in the user's inbox.

  • UI should display last 10 days of messages to inbox (need timestamp for this?). This allows different UIs to use same plugin/service. [get time from inline call to Transact service -- blocktime]

The chainmail app will have an "Archive" view. There, a user can see their non-pruned archived messages. The plugin will expose a query to the UI to fetch those. That "Archive" should prominently display a banner informing the user that archived emails are subject to purging at the discretion of the node operator.

The user, however, may want to save emails--preventing them from being purged or automatically archived. This would be a separate action that commits the given message to the chain state. This could feature as a bookmark toggle on the message itself. Of course, unsave should also exist. #855

Cases:

  • save archived message => save
  • save inbox message
  • archiving saved message => unsave, archive
    What out for:
  • query when messages have been pruned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
System app Related to system services and their apps/plugins
Projects
None yet
Development

No branches or pull requests

2 participants