Skip to content

Feat/model update Fix #797#798

Merged
demchenkoalex merged 4 commits intoflyerhq:mainfrom
nicolasbraun:feat/model_update
Jun 8, 2025
Merged

Feat/model update Fix #797#798
demchenkoalex merged 4 commits intoflyerhq:mainfrom
nicolasbraun:feat/model_update

Conversation

@nicolasbraun
Copy link
Copy Markdown
Contributor

As discussed in #797

  • Add pinned bool field on Message

Took the opportunity to add editedAt, editedByUserId on TextMessage which is also a classic usecase to display when a message as been edited (maybe it should be on Message). updatedAt is not enough because a message can be updated for many reasons (like adding previewData).

If you are ok with those change I could propose an update to FlyerChatTextMessage and SimpleTextMessage to display to "Modified" mention.

Also I'm wondering if
-a deletedByUserId field would by a classic usecase too. (In many apps admins can delete other people messages).

  • text should no be on all models, many apps allow to send attachments with a text

@demchenkoalex
Copy link
Copy Markdown
Member

  • editedByUserId is an implementation detail and should belong to metadata
  • please make pinned an optional bool with no default value - this way, if it’s not used, it won’t be serialized/deserialized.
  • editedAt looks good 👍

@nicolasbraun
Copy link
Copy Markdown
Contributor Author

@demchenkoalex Done 🚀

@demchenkoalex demchenkoalex merged commit e164caa into flyerhq:main Jun 8, 2025
1 check passed
@nicolasbraun nicolasbraun deleted the feat/model_update branch June 9, 2025 07:36
aljanshere pushed a commit to aljanshere/flutter_chat_ui that referenced this pull request Jun 18, 2025
* Add pinned bool to Message model

* Add edited information on TextMessage

* Make pin optional

* Remove editedByUserId
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants