mirror of
https://github.com/freescout-helpdesk/freescout.git
synced 2025-01-31 20:11:38 +01:00
Implement configuration file for default subscriptions (fixes #294)
This commit is contained in:
parent
3f17e9b811
commit
038c3610ac
@ -49,23 +49,6 @@ class Subscription extends Model
|
||||
self::MEDIUM_MOBILE,
|
||||
];
|
||||
|
||||
public static $default_subscriptions = [
|
||||
self::MEDIUM_EMAIL => [
|
||||
self::EVENT_CONVERSATION_ASSIGNED_TO_ME,
|
||||
self::EVENT_FOLLOWED_CONVERSATION_UPDATED,
|
||||
//self::EVENT_MY_TEAM_MENTIONED,
|
||||
self::EVENT_CUSTOMER_REPLIED_TO_MY,
|
||||
self::EVENT_USER_REPLIED_TO_MY,
|
||||
],
|
||||
self::MEDIUM_BROWSER => [
|
||||
self::EVENT_CONVERSATION_ASSIGNED_TO_ME,
|
||||
self::EVENT_FOLLOWED_CONVERSATION_UPDATED,
|
||||
//self::EVENT_MY_TEAM_MENTIONED,
|
||||
self::EVENT_CUSTOMER_REPLIED_TO_MY,
|
||||
self::EVENT_USER_REPLIED_TO_MY,
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* List of events that occured.
|
||||
*/
|
||||
@ -95,7 +78,7 @@ class Subscription extends Model
|
||||
*/
|
||||
public static function addDefaultSubscriptions($user_id)
|
||||
{
|
||||
self::saveFromArray(self::$default_subscriptions, $user_id);
|
||||
self::saveFromArray(\Config::get('subscriptions.defaults'), $user_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
31
config/subscriptions.php
Normal file
31
config/subscriptions.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|-------------------
|
||||
| Default Notification Subscriptions
|
||||
|----------------------
|
||||
|
|
||||
| This file is for configuring the default notification subscriptions for new users.
|
||||
|
|
||||
*/
|
||||
|
||||
'defaults' => [
|
||||
\App\Subscription::MEDIUM_EMAIL => [
|
||||
\App\Subscription::EVENT_CONVERSATION_ASSIGNED_TO_ME,
|
||||
\App\Subscription::EVENT_FOLLOWED_CONVERSATION_UPDATED,
|
||||
//\App\Subscription::EVENT_MY_TEAM_MENTIONED,
|
||||
\App\Subscription::EVENT_CUSTOMER_REPLIED_TO_MY,
|
||||
\App\Subscription::EVENT_USER_REPLIED_TO_MY,
|
||||
],
|
||||
\App\Subscription::MEDIUM_BROWSER => [
|
||||
\App\Subscription::EVENT_CONVERSATION_ASSIGNED_TO_ME,
|
||||
\App\Subscription::EVENT_FOLLOWED_CONVERSATION_UPDATED,
|
||||
//\App\Subscription::EVENT_MY_TEAM_MENTIONED,
|
||||
\App\Subscription::EVENT_CUSTOMER_REPLIED_TO_MY,
|
||||
\App\Subscription::EVENT_USER_REPLIED_TO_MY,
|
||||
],
|
||||
],
|
||||
|
||||
];
|
Loading…
x
Reference in New Issue
Block a user