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

Disappearing messages #91

Closed
kisamoto opened this issue Jun 5, 2024 · 3 comments · Fixed by #130
Closed

Disappearing messages #91

kisamoto opened this issue Jun 5, 2024 · 3 comments · Fixed by #130
Labels
enhancement New feature or request

Comments

@kisamoto
Copy link
Contributor

kisamoto commented Jun 5, 2024

Similar to Signal disappearing messages, allow users to set a time after which the message will be deleted.

Use case: I am a privacy conscious user who appreciates seeing my conversations and messages over the last 6 months however I don't want to manually go through and clean things up. Instead, I'd like to set something that will automatically clean them up for me.

@kisamoto kisamoto added the enhancement New feature or request label Jun 5, 2024
@kisamoto
Copy link
Contributor Author

We'll need to remove the CASCADE delete and modify the delete message behavior. We don't want an old disappearing message causing all of the next messages to also delete.

@kisamoto
Copy link
Contributor Author

Approach:

  • Set an optional duration field on a conversation
  • New messages have an expiration date set when added if the conversation has a duration field. This way we do not affect existing messages that have been sent.
  • A message is 'expired' if expiration date is in the past and it is not manually marked not to be deleted
  • Internal task runner (cron-esq but in the app) that frequently identifies and deletes expired messages
  • Messages can be marked to not be automatically deleted

Things to be aware of:

  • We CANNOT have cascade delete of messages as this will delete the sibling messages that are not expired UNLESS we change the logic so that all root level messages have null parents.
  • We have to be careful about floating arms of messages. i.e. threads that are left hanging because the parent is automatically deleted.
  • We need to align with manually deleted messages. If manually deleted message leaves a placeholder This message has been deleted message, we should do the same.

As a result, additional actions to be taken:

  • Remove CASCADE delete
  • Modify manual delete behavior so that it only deletes one message
  • Ignore hanging threads for now, create a new issue to clean up messages where the parent doesn't exist any more

@kisamoto
Copy link
Contributor Author

Oh and also add a bento feature that disappearing messages are available

@kisamoto kisamoto linked a pull request Jul 1, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant