Messages are scheduled using a function that returns a promise which is resolved after messages are sent.
https://linear.app/comm/issue/ENG-8674/track-progress-of-sending-tunnelbroker-messages
Depends on D12776
Paths
| Differential D12786 Authored by tomek on Jul 17 2024, 10:54 AM.
Details
Summary Messages are scheduled using a function that returns a promise which is resolved after messages are sent. https://linear.app/comm/issue/ENG-8674/track-progress-of-sending-tunnelbroker-messages Depends on D12776 Test Plan Tested on both native and web. Added some code await this.props.p2p.sendDMOperation({ op: { type: 'send_text_message', threadID: messageInfo.threadID, creatorID: messageInfo.creatorID, time: messageInfo.time, messageID: getUUID(), text: messageInfo.text, }, supportsAutoRetry: false, recipients: 'self_devices', }); to input state containers so that it is called after sending messages. Checked if the second device received a message after sending a text message.
Diff Detail
Event TimelineHerald added a subscriber: ashoat. · View Herald TranscriptJul 17 2024, 10:54 AM2024-07-17 10:54:29 (UTC-7) tomek edited the summary of this revision. (Show Details)Jul 17 2024, 10:55 AM2024-07-17 10:55:53 (UTC-7) Harbormaster completed remote builds in B30425: Diff 42397.Jul 17 2024, 11:11 AM2024-07-17 11:11:30 (UTC-7) Comment Actions I wonder what the difference is between our terms "P2P messages" and "DM"s I think "P2P messages" cover a superset of DMs – it's basically all client-to-client messages that are encrypted and passed via Tunnelbroker. Does that sound right? And is it consistent with our usage here? Comment Actions
Yes, I agree - "P2P messages" cover a superset of DMs. What I'm describing here is sending P2P messages generated from a single DM operation. I'm going to review the naming and make sure it isn't confusing. Harbormaster completed remote builds in B30465: Diff 42464.Jul 18 2024, 5:51 AM2024-07-18 05:51:39 (UTC-7) tomek edited the test plan for this revision. (Show Details)Jul 18 2024, 6:57 AM2024-07-18 06:57:29 (UTC-7) Harbormaster completed remote builds in B30468: Diff 42467.Jul 18 2024, 7:10 AM2024-07-18 07:10:23 (UTC-7) Comment Actions I think the usage of if and dmOpID can be improved and more descriptive, this might look confusing as we have plenty IDs all over the codebase - but I don't have idea about better ones
This revision is now accepted and ready to land.Jul 18 2024, 7:18 AM2024-07-18 07:18:41 (UTC-7) Comment Actions
Makes sense. In fact id and dmOpID are the same ID. Harbormaster completed remote builds in B30715: Diff 42838.Jul 26 2024, 7:14 AM2024-07-26 07:14:19 (UTC-7) Harbormaster completed remote builds in B30716: Diff 42839.Jul 26 2024, 7:22 AM2024-07-26 07:22:21 (UTC-7) Closed by commit rCOMMd0b9971793b3: [lib] Track progress of message processing (authored by tomek). · Explain WhyJul 26 2024, 8:42 AM2024-07-26 08:42:16 (UTC-7) This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 42467 lib/handlers/db-ops-handler.react.js
lib/reducers/db-ops-reducer.js
lib/tunnelbroker/peer-to-peer-context.js
lib/types/db-ops-types.js
|