HomePhabricator
Diffusion Comm 7c887f023e95

Utilities to idempotently create content and notif sessions

Description

Utilities to idempotently create content and notif sessions

Summary: This differential modifies utility function that creates content session to create both content and notif sessions idempotently

Test Plan:

  1. Apply this stash: https://gist.github.com/marcinwasowicz/047b0f1b00079562b2547ebe3a8c18ad. This stash does some of the work https://linear.app/comm/project/send-encrypted-notification-from-the-client-to-the-tunnelbroker-03fc019ed3ee/issues is supposed to do. Message reducer is modified to return MessageData array and db-ops-handler greedily consumes MessageData array to create and send encrypted notifications through TB.
  2. Send text message from a client (any platform).
  3. Ensure that the first time you send message there are logs indicating that session are created with particular device ids (thread members device ids).
  4. Ensure that each time you see in the console logged payloads of encrypted notifications. Examine payloads. Ensure that they match relevant flow types. No notification will be displayed on the receiving client since they can't decrypt the notif yet.

Reviewers: tomek, inka

Reviewed By: tomek

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D12673