use-chat
use-chat copied to clipboard
Add metadata to ChatMessage
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!
@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 https://github.com/chatscope/use-chat/blob/c9977f286dee9d6ba2ece1d986c942a180b907f9/src/ChatMessage.ts#L63
If it works, I can release a new major version based on the alpha branch.
that version working well for me