Fix replying from push notification (#1894)
This commit is contained in:
parent
8bee2b436c
commit
f89c45f986
2 changed files with 2 additions and 2 deletions
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue