mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-03 20:18:33 -05:00 
			
		
		
		
	Merge pull request #5153 from turbo124/v5-develop
Small fix for user notifications
This commit is contained in:
		
						commit
						0f66845701
					
				@ -68,7 +68,7 @@ class Kernel extends ConsoleKernel
 | 
				
			|||||||
        /* Run queue's with this*/
 | 
					        /* Run queue's with this*/
 | 
				
			||||||
        if (Ninja::isSelfHost()) {
 | 
					        if (Ninja::isSelfHost()) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $schedule->command('queue:work')->everyMinute()->withoutOverlapping();
 | 
					            $schedule->command('queue:work --daemon')->everyMinute()->withoutOverlapping();
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
            //we need to add this as we are seeing cached queues mess up the system on first load.
 | 
					            //we need to add this as we are seeing cached queues mess up the system on first load.
 | 
				
			||||||
            $schedule->command('queue:restart')->everyFiveMinutes()->withoutOverlapping();
 | 
					            $schedule->command('queue:restart')->everyFiveMinutes()->withoutOverlapping();
 | 
				
			||||||
 | 
				
			|||||||
@ -31,7 +31,7 @@ class DriverTemplate extends BaseDriver
 | 
				
			|||||||
        GatewayType::CREDIT_CARD => CreditCard::class, //maps GatewayType => Implementation class
 | 
					        GatewayType::CREDIT_CARD => CreditCard::class, //maps GatewayType => Implementation class
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const SYSTEM_LOG_TYPE = SystemLog::TYPE_STRIPE;
 | 
					    const SYSTEM_LOG_TYPE = SystemLog::TYPE_STRIPE; //define a constant for your gateway ie TYPE_YOUR_CUSTOM_GATEWAY - set the const in the SystemLog model
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public function setPaymentMethod($payment_method_id)
 | 
					    public function setPaymentMethod($payment_method_id)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
				
			|||||||
@ -34,7 +34,7 @@ trait UserNotifies
 | 
				
			|||||||
            array_push($required_permissions, 'all_user_notifications');
 | 
					            array_push($required_permissions, 'all_user_notifications');
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (count(array_intersect($required_permissions, $notifications->email)) >= 1 || count(array_intersect($required_permissions, 'all_user_notifications')) >= 1 || count(array_intersect($required_permissions, 'all_notifications')) >= 1) {
 | 
					        if (count(array_intersect($required_permissions, $notifications->email)) >= 1 || count(array_intersect($required_permissions, ['all_user_notifications'])) >= 1 || count(array_intersect($required_permissions, 'all_notifications')) >= 1) {
 | 
				
			||||||
            array_push($notifiable_methods, 'mail');
 | 
					            array_push($notifiable_methods, 'mail');
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user