fix(chat): publish kind 9 quote after room content creation for cross-client interoperability #187
Reference in New Issue
Block a user
Delete Branch "userAdityaa/flotilla:chat-interoperability"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Flotilla chat has been loading threads/goals/classifieds and other content kinds directly in the chat timeline. This works in Flotilla, but many Nostr clients only render kind 9 as chat messages.
Result: content created from chat could be missing in other clients’ chat timelines, causing broken conversation context.
Solution
For content created from chat, we now:
This preserves native content semantics while ensuring a standard chat timeline entry exists for interoperability.
Fixes #185
Behaviour after this PR
history.backwas moved before waiting on relay confirmation), so creation feels instant instead of waiting for network/auth round trips.@hodlbod, this PR is ready for review!
There are better solutions than just moving
history.back()for example, using a loader or background queue for publishing. This is a quick improvement, but open to your thoughts on a more better approach.
(and) Should I split this into 2–3 smaller commits, or keep it as a single atomic commit for now?
This looks good, except for the history.back stuff. We should wait for the calendar/thread/goal thunk to finish publishing before closing the modal so that if there is an error it's shown in context. A spinner is actually a nice reassurance that something is happening, and if we keep the modal open the error is actionable — the user has control over deciding what to fix or whether to try.
Once the main content event is published we can close the modal and not wait for the message error. The user is already on the chat page, so if the message has an error it will already be shown inline, so there's no need to show the toast. This will clean things up nicely.
BTW, once you're finished with this, please go ahead and focus on Caravel, that's my top priority right now.
Yeah, this will be my last one for a few days, I’ll be fully focusing on Caravel.
172befcf57toc397ee38bbOne follow-up on this — we should remove MESSAGE_KINDS entirely and use MESSAGE where relevant. This will slim down sync and notifications in particular.
@hodlbod,
addressed the feedback and retained
history.backas suggested. Also disabled the “Go Back” button to ensure a safer UX.please refer to the attached video for the UI changes.
I’m now focusing entirely on Caravel.
Merged via
29bb33c2Pull request closed