gracefully catch errors when parsing membership state
This commit is contained in:
parent
f198888635
commit
30a5fa100c
3 changed files with 9 additions and 14 deletions
|
|
@ -58,16 +58,16 @@ class const Event({
|
|||
replyTo: replyToFromJson(getContentFromJson(json)),
|
||||
pmp: json["content"]?["com.beeper.per_message_profile"] == null
|
||||
? null
|
||||
: Profile.fromJsonWithCatch(
|
||||
: .fromJsonWithCatch(
|
||||
json["content"]?["com.beeper.per_message_profile"],
|
||||
),
|
||||
content: Content.fromEventJson(
|
||||
content: .fromEventJson(
|
||||
getContentFromJson(json),
|
||||
json["decrypted_type"] ?? json["type"],
|
||||
),
|
||||
previousContent: json["unsigned"]?["prev_content"] == null
|
||||
? null
|
||||
: Content.fromEventJson(
|
||||
: .fromEventJson(
|
||||
json["unsigned"]?["prev_content"],
|
||||
json["decrypted_type"] ?? json["type"],
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in a new issue