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

Edit message #39

Open
erlend-sh opened this issue Feb 4, 2025 · 7 comments
Open

Edit message #39

erlend-sh opened this issue Feb 4, 2025 · 7 comments
Assignees

Comments

@erlend-sh
Copy link
Contributor

Editable posts will be a nice little win that goes a long way to show that ‘we’re not your regular Bluesky app’, hehe.

Eventually we might wanna keep revisions of edits as well, if the storage is light enough.

@zicklag
Copy link
Contributor

zicklag commented Feb 5, 2025

Eventually we might wanna keep revisions of edits as well, if the storage is light enough.

We don't have a choice actually. 😄 Everything in automerge is remembered. The overhead is less than making another chat, so no biggie at all. We can actually support edits right now, all we need is the UI!

@erlend-sh erlend-sh added this to Roomy Feb 5, 2025
@erlend-sh erlend-sh moved this to Todo in Roomy Feb 5, 2025
@zeucapua
Copy link
Collaborator

zeucapua commented Feb 9, 2025

@zicklag How would I implement a function to know whether or not a message has been edited? And will the autodoc be remembered every time channel.change((doc) => {}) is called and the doc changed?

@zicklag
Copy link
Contributor

zicklag commented Feb 9, 2025

There are two ways to respond to changes.

  • You can use the channel.view in a svelte $effect() and it will re-run the effect when the doc changes.
  • The autodoc is an event emitter, so you can use channel.addEventListener('change', event => {}) and channel.removeEventListener().

And yes the autodoc is automatically saved and synced every time that we change it.

So editing shouldn't need any special handling. Just use channel.change to modify the doc and everything else should be handled.

@jshnjovu
Copy link

jshnjovu commented Feb 9, 2025 via email

@zicklag
Copy link
Contributor

zicklag commented Feb 9, 2025

@jshnjovu Yes roomy is Open Source, and yes you can contribute!

Let us know if there's something specific you'd like to work on. We've also got a Discord channel or a Matrix room if you want to chat. ( We don't have public chat on Roomy just yet, but it's coming. 😀 )

@verdverm
Copy link

Will Roomy support full deletes, like posts from Bluesky on ATProto?

(such that you cannot go into the CRDT history to recover deleted messages)

@zicklag
Copy link
Contributor

zicklag commented Feb 12, 2025

Will Roomy support full deletes, like posts from Bluesky on ATProto?

Good question. Once Beelay comes out for Automerge and we start using that, we are considering making each chat message it's own automerge document. If that works out, then it should be possible for us to request that a chat message be deleted, but just like on AtProto, nothing can force all clients or subscribers to actually delete it permanently. The official app would respect the request, of course.

Since the chat message itself would be in a different automerge document, the chat won't be in the Roomy channel's CRDT so we don't have to worry about the CRDT history. The history will just show the ID of the message that was there, and, when deleted, it could replace the message with a marker that requests client no longer retain the automerge document for the chat message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

5 participants