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

Add metadata to ChatMessage #22

Open
aledeloss opened this issue Sep 20, 2023 · 2 comments
Open

Add metadata to ChatMessage #22

aledeloss opened this issue Sep 20, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@aledeloss
Copy link

We need to add metada to messages, so we can use it in the frontend for custom styling, for example. Is it possible?
If not, do you think that it is feasible? I think that an optional metadata attribute in ChatMessage would work.
Thanks!

@supersnager supersnager added the enhancement New feature or request label Sep 20, 2023
@supersnager
Copy link
Contributor

@aledeloss Could you try the version from this branch https://github.com/chatscope/use-chat/tree/v4.0.0-alpha.9 ?
https://www.npmjs.com/package/@chatscope/use-chat/v/4.0.0-alpha.9
There is a generic parameter for additional data property

export class ChatMessage<T extends MessageContentType, D = undefined> {

If it works, I can release a new major version based on the alpha branch.

@singpolyma
Copy link

that version working well for me

@supersnager supersnager self-assigned this Jan 5, 2024
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

No branches or pull requests

3 participants