[lib] Modify the approach to handling invite link acceptance
Summary:
Later in the stack we need to join two threads which requires dispatching two success actions - something not possible in the current approach where we create a promise and pass it to a single dispatchActionPromise. In this new approach, we call dispatchActionPromise in an effect which allows adding the second effect later in the stack.
Note: this diff breaks a loading status. It is fixed in the next diff where steps are introduced. This approach is more efficient than fixing it in this diff.
https://linear.app/comm/issue/ENG-8250/join-a-thread-after-joining-a-community
Depends on D12422
Test Plan: Tested in combination with the rest of the stack by checking if joining a community link works.
Reviewers: inka, ginsu, kamil
Reviewed By: kamil
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D12423