1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +03:00

Merge branch 'develop' into gsouquet/threaded-messaging-2349

This commit is contained in:
Germain Souquet
2021-08-17 11:14:10 +01:00
32 changed files with 1084 additions and 746 deletions

View File

@@ -29,6 +29,7 @@ import { Crypto } from "../crypto";
import { deepSortedObjectEntries } from "../utils";
import { RoomMember } from "./room-member";
import { Thread } from "./thread";
import { IActionsObject } from '../pushprocessor';
/**
* Enum for event statuses.
@@ -149,7 +150,7 @@ export interface IDecryptOptions {
}
export class MatrixEvent extends EventEmitter {
private pushActions: object = null;
private pushActions: IActionsObject = null;
private _replacingEvent: MatrixEvent = null;
private _localRedactionEvent: MatrixEvent = null;
private _isCancelled = false;
@@ -960,7 +961,7 @@ export class MatrixEvent extends EventEmitter {
*
* @return {?Object} push actions
*/
public getPushActions(): object | null {
public getPushActions(): IActionsObject | null {
return this.pushActions;
}
@@ -969,7 +970,7 @@ export class MatrixEvent extends EventEmitter {
*
* @param {Object} pushActions push actions
*/
public setPushActions(pushActions: object): void {
public setPushActions(pushActions: IActionsObject): void {
this.pushActions = pushActions;
}
@@ -1247,10 +1248,15 @@ export class MatrixEvent extends EventEmitter {
}
/**
* Summarise the event as JSON for debugging. If encrypted, include both the
* decrypted and encrypted view of the event. This is named `toJSON` for use
* with `JSON.stringify` which checks objects for functions named `toJSON`
* and will call them to customise the output if they are defined.
* Summarise the event as JSON. This is currently used by React SDK's view
* event source feature and Seshat's event indexing, so take care when
* adjusting the output here.
*
* If encrypted, include both the decrypted and encrypted view of the event.
*
* This is named `toJSON` for use with `JSON.stringify` which checks objects
* for functions named `toJSON` and will call them to customise the output
* if they are defined.
*
* @return {Object}
*/