mirror of
https://github.com/friendica/friendica
synced 2025-09-05 22:05:26 +02:00
Add support for notification visibility settings
This commit is contained in:
parent
6818c8e69a
commit
04ac4841f9
3 changed files with 60 additions and 4 deletions
|
@ -35,8 +35,10 @@ use Friendica\Model\Item;
|
|||
use Friendica\Model\Notification;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Model\Verb;
|
||||
use Friendica\Module\BaseSettings;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Protocol\Activity;
|
||||
use Friendica\Protocol\Email;
|
||||
use Friendica\Util\Temporal;
|
||||
use Friendica\Worker\Delivery;
|
||||
|
@ -352,7 +354,18 @@ function settings_post(App $a)
|
|||
DI::pConfig()->set(local_user(), 'expire', 'photos', $expire_photos);
|
||||
DI::pConfig()->set(local_user(), 'expire', 'network_only', $expire_network_only);
|
||||
|
||||
// Reset like notifications when they are going to be shown again
|
||||
if (!DI::pConfig()->get(local_user(), 'system', 'notify_like') && $notify_like) {
|
||||
DI::notification()->setAllSeenForUser(local_user(), ['vid' => Verb::getID(Activity::LIKE)]);
|
||||
}
|
||||
|
||||
DI::pConfig()->set(local_user(), 'system', 'notify_like', $notify_like);
|
||||
|
||||
// Reset share notifications when they are going to be shown again
|
||||
if (!DI::pConfig()->get(local_user(), 'system', 'notify_announce') && $notify_announce) {
|
||||
DI::notification()->setAllSeenForUser(local_user(), ['vid' => Verb::getID(Activity::ANNOUNCE)]);
|
||||
}
|
||||
|
||||
DI::pConfig()->set(local_user(), 'system', 'notify_announce', $notify_announce);
|
||||
|
||||
DI::pConfig()->set(local_user(), 'system', 'email_textonly', $email_textonly);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue