[Event] Fix reply check

This commit is contained in:
Christian Pauly 2020-02-11 11:28:26 +00:00
parent fb9d8613ee
commit cc02668593

View file

@ -23,7 +23,6 @@
import 'dart:convert'; import 'dart:convert';
import 'package:famedlysdk/famedlysdk.dart'; import 'package:famedlysdk/famedlysdk.dart';
import 'package:famedlysdk/src/utils/matrix_id_string_extension.dart';
import 'package:famedlysdk/src/utils/receipt.dart'; import 'package:famedlysdk/src/utils/receipt.dart';
import './room.dart'; import './room.dart';
@ -374,9 +373,7 @@ class Event {
content['m.relates_to']['m.in_reply_to'] is Map<String, dynamic> && content['m.relates_to']['m.in_reply_to'] is Map<String, dynamic> &&
content['m.relates_to']['m.in_reply_to']['event_id'] is String && content['m.relates_to']['m.in_reply_to']['event_id'] is String &&
(content['m.relates_to']['m.in_reply_to']['event_id'] as String) (content['m.relates_to']['m.in_reply_to']['event_id'] as String)
.isValidMatrixId && .isNotEmpty;
(content['m.relates_to']['m.in_reply_to']['event_id'] as String).sigil ==
"\$";
/// Searches for the reply event in the given timeline. /// Searches for the reply event in the given timeline.
Future<Event> getReplyEvent(Timeline timeline) async { Future<Event> getReplyEvent(Timeline timeline) async {