Merge branch 'soru/fix-redacts' into 'master'

Fix redact events

See merge request famedly/famedlysdk!335
This commit is contained in:
Christian Pauly 2020-06-05 12:27:57 +00:00
commit 3975bcaea5

View file

@ -24,6 +24,7 @@ class MatrixEvent extends StrippedStateEvent {
DateTime originServerTs;
Map<String, dynamic> unsigned;
Map<String, dynamic> prevContent;
String redacts;
MatrixEvent();
@ -43,6 +44,7 @@ class MatrixEvent extends StrippedStateEvent {
prevContent = json['prev_content'] != null
? Map<String, dynamic>.from(json['prev_content'])
: null;
redacts = json['redacts'];
}
@override
@ -62,6 +64,9 @@ class MatrixEvent extends StrippedStateEvent {
if (data['state_key'] == null) {
data.remove('state_key');
}
if (redacts != null) {
data['redacts'] = redacts;
}
return data;
}
}