Fix redact events
This commit is contained in:
parent
f7e9bbafac
commit
860051da0e
|
@ -24,6 +24,7 @@ class MatrixEvent extends StrippedStateEvent {
|
||||||
DateTime originServerTs;
|
DateTime originServerTs;
|
||||||
Map<String, dynamic> unsigned;
|
Map<String, dynamic> unsigned;
|
||||||
Map<String, dynamic> prevContent;
|
Map<String, dynamic> prevContent;
|
||||||
|
String redacts;
|
||||||
|
|
||||||
MatrixEvent();
|
MatrixEvent();
|
||||||
|
|
||||||
|
@ -43,6 +44,7 @@ class MatrixEvent extends StrippedStateEvent {
|
||||||
prevContent = json['prev_content'] != null
|
prevContent = json['prev_content'] != null
|
||||||
? Map<String, dynamic>.from(json['prev_content'])
|
? Map<String, dynamic>.from(json['prev_content'])
|
||||||
: null;
|
: null;
|
||||||
|
redacts = json['redacts'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -62,6 +64,9 @@ class MatrixEvent extends StrippedStateEvent {
|
||||||
if (data['state_key'] == null) {
|
if (data['state_key'] == null) {
|
||||||
data.remove('state_key');
|
data.remove('state_key');
|
||||||
}
|
}
|
||||||
|
if (redacts != null) {
|
||||||
|
data['redacts'] = redacts;
|
||||||
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue