[Event] Fix getReplyEvent

This commit is contained in:
Christian Pauly 2020-02-17 15:42:11 +00:00
parent 75c1dc1c56
commit 600820a40d

View file

@ -378,7 +378,7 @@ class Event {
/// 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 {
if (!isReply) return null; if (!isReply) return null;
final String replyEventId = content['m.relates_to']['m.in_reply_to']; final String replyEventId = content['m.relates_to']['m.in_reply_to']['event_id'];
return await timeline.getEventById(replyEventId); return await timeline.getEventById(replyEventId);
} }
} }