Merge pull request #3690 from alfonso-salces/MOBILE-4344
[4.3] MOBILE-4344 cron: Check notification and messagesmain
commit
6517e108ad
|
@ -191,7 +191,14 @@ export class AddonMessagesMainMenuHandlerService implements CoreMainMenuHandler,
|
||||||
* @returns Promise resolved when done, rejected if failure.
|
* @returns Promise resolved when done, rejected if failure.
|
||||||
*/
|
*/
|
||||||
async execute(siteId?: string): Promise<void> {
|
async execute(siteId?: string): Promise<void> {
|
||||||
if (!CoreSites.isCurrentSite(siteId)) {
|
const site = CoreSites.getCurrentSite();
|
||||||
|
|
||||||
|
if (
|
||||||
|
!CoreSites.isCurrentSite(siteId) ||
|
||||||
|
!site ||
|
||||||
|
site.isFeatureDisabled('CoreMainMenuDelegate_AddonMessages') ||
|
||||||
|
!site.canUseAdvancedFeature('messaging')
|
||||||
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,13 @@ export class AddonNotificationsCronHandlerService implements CoreCronHandler {
|
||||||
*/
|
*/
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
async execute(siteId?: string, force?: boolean): Promise<void> {
|
async execute(siteId?: string, force?: boolean): Promise<void> {
|
||||||
if (!CoreSites.isCurrentSite(siteId)) {
|
const site = CoreSites.getCurrentSite();
|
||||||
|
|
||||||
|
if (
|
||||||
|
!CoreSites.isCurrentSite(siteId) ||
|
||||||
|
!site ||
|
||||||
|
site.isFeatureDisabled('CoreMainMenuDelegate_AddonNotifications')
|
||||||
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue