[lib] Enable automatic retries for some messages
Summary:
Modify processOutboundP2PMessages function so that it sends all automatically_retried messages when called without parameters. Add an effect scheduling the retry job.
https://linear.app/comm/issue/ENG-8729/automatic-retries-for-non-composable-dms
Depends on D12746
Test Plan:
Tested on both native and web: modified our text message sending logic so that DMOps are generated and scheduled when we send a message:
- Sent a message and checked if sending messages was attempted.
- Modified the logic in processOutboundP2PMessages so that every other message fails. Checked if the retry was attempted after 30s.
Reviewers: kamil, marcin
Reviewed By: kamil
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D12747