From b1bf3a76f5e5fe6411840ad08c7ada56069b4e88 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Thu, 11 May 2023 17:01:57 +0200 Subject: [PATCH] MOBILE-4270 forum: Fix discussion push handler in tablet --- src/addons/mod/forum/services/handlers/push-click.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/addons/mod/forum/services/handlers/push-click.ts b/src/addons/mod/forum/services/handlers/push-click.ts index 220a3cce2..fb520cc3e 100644 --- a/src/addons/mod/forum/services/handlers/push-click.ts +++ b/src/addons/mod/forum/services/handlers/push-click.ts @@ -61,6 +61,8 @@ export class AddonModForumPushClickHandlerService implements CorePushNotificatio const cmId = Number(data.cmid); const pageParams: Params = { forumId: Number(data.instance), + cmId, + courseId, }; if (data.postid || contextUrlParams.urlHash) { @@ -68,11 +70,11 @@ export class AddonModForumPushClickHandlerService implements CorePushNotificatio } await CoreUtils.ignoreErrors( - AddonModForum.invalidateDiscussionPosts(pageParams.discussionId, undefined, notification.site), + AddonModForum.invalidateDiscussionPosts(discussionId, undefined, notification.site), ); await CoreNavigator.navigateToSitePath( - `${AddonModForumModuleHandlerService.PAGE_NAME}/${courseId}/${cmId}/${discussionId}`, + `${AddonModForumModuleHandlerService.PAGE_NAME}/discussion/${discussionId}`, { siteId: notification.site, params: pageParams }, ); }