forked from EVOgeek/Vmeda.Online
		
	MOBILE-4344 cron: Check notification and messages
This commit is contained in:
		
							parent
							
								
									affcf93df8
								
							
						
					
					
						commit
						2738e08abb
					
				| @ -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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user