Process IndexedError events for SendMessageToPeerError

This commit is contained in:
Sarah Jamie Lewis 2021-05-24 18:09:19 -07:00
parent dfe67b01ae
commit 7fba47a1e0
1 changed files with 11 additions and 0 deletions

View File

@ -102,6 +102,17 @@ class CwtchNotifier {
}
}
break;
case "IndexedFailure":
print("IndexedFailure: $data");
var idx = data["Index"];
var key = profileCN.getProfile(data["ProfileOnion"]).contactList.getContact(data["RemotePeer"]).getMessageKey(idx);
try {
var message = Provider.of<MessageState>(key.currentContext!, listen: false);
message.error = true;
} catch (e) {
// ignore, we likely have an old key that has been replaced with an actual signature
}
break;
case "SendMessageToGroupError":
// from me (already displayed - do not update counter)
print("SendMessageToGroupError: $data");