Further refactor MessageContentModel

Further refactor MessageContentModel. Move away from special casing certian MessageContentTypes. Use forEachComponentOfType more
This commit is contained in:
James Graham
2025-07-16 18:27:03 +01:00
parent a17aa2c6fa
commit 7a5de25885
4 changed files with 75 additions and 75 deletions

View File

@@ -78,7 +78,15 @@ public:
{
using namespace Quotient;
if (event.isRedacted()) {
return MessageComponentType::Text;
}
if (const auto e = eventCast<const RoomMessageEvent>(&event)) {
if (e->rawMsgtype() == u"m.key.verification.request"_s) {
return MessageComponentType::Verification;
}
switch (e->msgtype()) {
case MessageEventType::Emote:
return MessageComponentType::Text;