use-chat icon indicating copy to clipboard operation
use-chat copied to clipboard

Add metadata to ChatMessage

Open aledeloss opened this issue 1 year ago • 2 comments

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 avatar Sep 20 '23 18:09 aledeloss

@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.

supersnager avatar Sep 20 '23 21:09 supersnager

that version working well for me

singpolyma avatar Nov 08 '23 18:11 singpolyma