Merge pull request #3661 from matrix-org/bwindels/verif-toasts
Show incoming verification requests in in-app notifications
This commit is contained in:
commit
4a684d01a4
13 changed files with 424 additions and 29 deletions
|
@ -30,6 +30,18 @@ export default class KeyVerificationStateObserver {
|
|||
this._updateVerificationState();
|
||||
}
|
||||
|
||||
get concluded() {
|
||||
return this.accepted || this.done || this.cancelled;
|
||||
}
|
||||
|
||||
get pending() {
|
||||
return !this.concluded;
|
||||
}
|
||||
|
||||
setCallback(callback) {
|
||||
this._updateCallback = callback;
|
||||
}
|
||||
|
||||
attach() {
|
||||
this._requestEvent.on("Event.relationsCreated", this._onRelationsCreated);
|
||||
for (const phaseName of SUB_EVENT_TYPES_OF_INTEREST) {
|
||||
|
@ -83,7 +95,7 @@ export default class KeyVerificationStateObserver {
|
|||
|
||||
_onRelationsUpdated = (event) => {
|
||||
this._updateVerificationState();
|
||||
this._updateCallback();
|
||||
this._updateCallback && this._updateCallback();
|
||||
};
|
||||
|
||||
_updateVerificationState() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue