From 34d77d8d143978768aa5baef511ae19b77377023 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Fri, 15 Mar 2019 13:18:04 +0100 Subject: [PATCH] MOBILE-2921 push: Support contact request notifications --- src/addon/messages/providers/push-click-handler.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/addon/messages/providers/push-click-handler.ts b/src/addon/messages/providers/push-click-handler.ts index a5fc3acf0..f6fcf3c0e 100644 --- a/src/addon/messages/providers/push-click-handler.ts +++ b/src/addon/messages/providers/push-click-handler.ts @@ -15,7 +15,7 @@ import { Injectable } from '@angular/core'; import { CoreUtilsProvider } from '@providers/utils/utils'; import { CorePushNotificationsClickHandler } from '@core/pushnotifications/providers/delegate'; -import { CoreContentLinksHelperProvider } from '@core/contentlinks/providers/helper'; +import { CoreLoginHelperProvider } from '@core/login/providers/helper'; import { AddonMessagesProvider } from './messages'; /** @@ -28,7 +28,7 @@ export class AddonMessagesPushClickHandler implements CorePushNotificationsClick featureName = 'CoreMainMenuDelegate_AddonMessages'; constructor(private utils: CoreUtilsProvider, private messagesProvider: AddonMessagesProvider, - private linkHelper: CoreContentLinksHelperProvider) {} + private loginHelper: CoreLoginHelperProvider) {} /** * Check if a notification click is handled by this handler. @@ -37,7 +37,7 @@ export class AddonMessagesPushClickHandler implements CorePushNotificationsClick * @return {boolean} Whether the notification click is handled by this handler */ handles(notification: any): boolean | Promise { - if (this.utils.isTrueOrOne(notification.notif)) { + if (this.utils.isTrueOrOne(notification.notif) && notification.name != 'messagecontactrequests') { return false; } @@ -70,7 +70,7 @@ export class AddonMessagesPushClickHandler implements CorePushNotificationsClick pageParams.discussionUserId = Number(notification.userfromid); } - return this.linkHelper.goInSite(undefined, pageName, pageParams, notification.site); + return this.loginHelper.redirect(pageName, pageParams, notification.site); }); }); }