Fix replying from push notification (#1894)

This commit is contained in:
Elias Nahum 2018-07-09 14:59:19 -04:00
parent 8bee2b436c
commit f89c45f986
No known key found for this signature in database
GPG key ID: E038DB71E0B61702
2 changed files with 2 additions and 2 deletions

View file

@ -208,7 +208,7 @@ export function loadPostsIfNecessaryWithRetry(channelId) {
export async function retryGetPostsAction(action, dispatch, getState, maxTries = MAX_POST_TRIES) {
for (let i = 0; i < maxTries; i++) {
const {data} = await action(dispatch, getState);
const {data} = await dispatch(action);
if (data) {
dispatch(setChannelRetryFailed(false));

View file

@ -135,7 +135,7 @@ export const onPushNotificationReply = (data, text, badge, completed) => {
Client4.setToken(token);
}
dispatch(retryGetPostsAction(getPosts(data.channel_id)));
retryGetPostsAction(getPosts(data.channel_id), dispatch, getState);
dispatch(createPost(post)).then(() => {
dispatch(markChannelAsRead(data.channel_id));