Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
outboxActions [nfc]: Make
trySendMessages
a thunk action creator.
It'll be easier to write a test for it, when we eventually attempt that, probably pending resolution of zulip#3881. In particular, without this change, Flow would complain if we tried to pass `store.dispatch` -- where `store` is mocked using redux-mock-store -- as the first argument, for which our custom `Dispatch` type is expected. I suspect this could be fixed by tightening up the redux-mock-store libdef's `Dispatch` type. But, for consistency's sake, `trySendMessages` should probably be a thunk action creator in any case. In e5268bb (and confirmed again with logging just now), we observed that the return value of our function (in this case a boolean) will be passed through and returned by the `dispatch` call.
- Loading branch information