This is an alternative approach to an existing mechanism for manual retries and sending composable DM messages.
Changes here:
- Using dedicated actions (sendMultimediaMessageActionTypes and sendTextMessageActionTypes) and removing additional sendDMActionTypes.
- Removed complicated code from useProcessAndSendDMOperation and removed entirely useRetrySendDMOperation (because we using dedicated actions, it should work out-of-the-box).
- Change approach to not always return success with messages that succeded, but failure when at least one message failed and handled this on sendTextMessageActionTypes.failed or sendMultimediaMessageActionTypes.failed - which is more intuitive.
- In the case of text and multimedia messages, DMOperation is sendOnly - changes to our store are made using dedicated actions.
- Logic with localID is now the same as for thin threads. When sending actual DM Operation we generate a new uuid for the message, which works the same way as serverID for think threads.
- InputStateContainer works regardless of whether this is a thin or thick thread, only when making an actual API request, we decide whether we should hit keyserver or tunnelbroker.
With that change, code is more readable and easier to maintain, and it reduces some complexity.
Additionally, because there are no additional changes related to multimedia in InputStateContainer, it makes it realistic to deliver it this week.
I would love high-level feedback - if this is okay I can slice it for smaller diffs and improve the code.