Skip to content

Commit

Permalink
Remove null comparison and add doc to remote echo
Browse files Browse the repository at this point in the history
  • Loading branch information
florianduros committed Aug 9, 2023
1 parent ea10f5f commit 2e69578
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/rust-crypto/rust-crypto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,8 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, RustCryptoEv
*/
public async onLiveEventFromSync(event: MatrixEvent): Promise<void> {
// Ignore state event or remote echo
if (event.isState() || event.getUnsigned().transaction_id === null) return;
// transaction_id is provided in case of remote echo {@link https://spec.matrix.org/v1.7/client-server-api/#local-echo}
if (event.isState() || event.getUnsigned().transaction_id) return;

const processEvent = async (evt: MatrixEvent): Promise<void> => {
// Process only verification event
Expand Down

0 comments on commit 2e69578

Please sign in to comment.