https://linear.app/comm/issue/ENG-10141/retrying-message-on-prod-cause-it-sending-multiple-times
To reproduce have a device in a "broken" state (? instead of web/mobile icon). Send a message. It will
fail with log "Keys missing for device ..." but the message will be delivered. Showing that the delivery failed
is ok (we couldn't deliver to the broken device) but after retrying the message will be delivered again and
the other user will see duplicated messages.
The exception is thrown in function returned from useInputStateContainerSendTextMessage. failedOutboundP2PMessageIDs is
set correctly here. But then the exception is caught in sendTextMessageAction and re-thrown without setting failedOutboundP2PMessageIDs.
failedOutboundP2PMessageIDs is then used do determine how we should resend the message.
Therefore setting failedOutboundP2PMessageIDs in sendTextMessageAction fixes the bug.