You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, note that I'm a complete newbie to JS (and more to TS), so maybe there is already a way that I don't know.
In a number of situations it may be interesting to be able to access to the content format and formatted_body attributes from within MessageEvent. In my case, I'm working in a bot that, apart from other utilities will also provide DB logging of configured rooms for later vies/search via web and, whenever available, it would be perfect to have the html information at hand.
Looking to code base, I've seen some uses of them around TextualMessageEventContent model definitions and also when sending using the "html" methods. But I've been unable to access to those attributes, and I've tried all the ways I was able to imagine. So I've had to apply this ugly trick to get access to them:
const anyContent = (message.content as any);
if (anyContent.format) {
...
...
It would be great if the very same we have the "send as html" methods, we could access to that format and html information when available in incoming messages.
Again, sorry for my ignorance if there is a way to access to that information, I've tried my best, ciao :-)
The text was updated successfully, but these errors were encountered:
First of all, note that I'm a complete newbie to JS (and more to TS), so maybe there is already a way that I don't know.
In a number of situations it may be interesting to be able to access to the content
format
andformatted_body
attributes from within MessageEvent. In my case, I'm working in a bot that, apart from other utilities will also provide DB logging of configured rooms for later vies/search via web and, whenever available, it would be perfect to have the html information at hand.Looking to code base, I've seen some uses of them around
TextualMessageEventContent
model definitions and also when sending using the "html" methods. But I've been unable to access to those attributes, and I've tried all the ways I was able to imagine. So I've had to apply this ugly trick to get access to them:It would be great if the very same we have the "send as html" methods, we could access to that format and html information when available in incoming messages.
Again, sorry for my ignorance if there is a way to access to that information, I've tried my best, ciao :-)
The text was updated successfully, but these errors were encountered: