Fix regex bug

This commit is contained in:
Henry Hiles 2025-12-24 16:53:13 -05:00
commit 11a946e6ea
No known key found for this signature in database
4 changed files with 98 additions and 128 deletions

View file

@ -8,9 +8,7 @@ extension EventToMessage on Event {
bool mustBeText = false,
bool includeEdits = false,
}) async {
final replyId = relationshipType == RelationshipTypes.reply
? relationshipEventId
: null;
final replyId = inReplyToEventId();
final newEvent = (unsigned?["m.relations"] as Map?)?["m.replace"];
final event = newEvent == null ? this : Event.fromJson(newEvent, room);