handleEventUpdate method

Future<void> handleEventUpdate(
  1. EventUpdate update
)

Implementation

Future<void> handleEventUpdate(EventUpdate update) async {
  if (update.type == EventUpdateType.ephemeral ||
      update.type == EventUpdateType.history) {
    return;
  }
  if (update.content['type'].startsWith('m.key.verification.') ||
      (update.content['type'] == EventTypes.Message &&
          (update.content['content']['msgtype'] is String) &&
          update.content['content']['msgtype']
              .startsWith('m.key.verification.'))) {
    // "just" key verification, no need to do this in sync
    runInRoot(() => keyVerificationManager.handleEventUpdate(update));
  }
  if (update.content['sender'] == client.userID &&
      update.content['unsigned']?['transaction_id'] == null) {
    // maybe we need to re-try SSSS secrets
    runInRoot(() => ssss.periodicallyRequestMissingCache());
  }
}