mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 16:55:18 +00:00
notification issues - there are a couple. This one prevents redundant notifications by groups.
This commit is contained in:
parent
8a943be609
commit
236b2ea27e
1 changed files with 11 additions and 2 deletions
|
@ -21,7 +21,7 @@ class Enotify
|
|||
* @param array $params an associative array with:
|
||||
* * \e string \b from_xchan sender xchan hash
|
||||
* * \e string \b to_xchan recipient xchan hash
|
||||
* * \e array \b item an assoziative array
|
||||
* * \e array \b item an associative array
|
||||
* * \e int \b type one of the NOTIFY_* constants from boot.php
|
||||
* * \e string \b link
|
||||
* * \e string \b parent_mid
|
||||
|
@ -165,7 +165,16 @@ class Enotify
|
|||
|
||||
$itemlink = $params['link'];
|
||||
|
||||
$action = t('commented on');
|
||||
if ($params['type'] === NOTIFY_RESHARE) {
|
||||
$action = t('repeated');
|
||||
if ($sender['xchan_type'] == XCHAN_TYPE_GROUP) {
|
||||
pop_lang();
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$action = t('commented on');
|
||||
}
|
||||
|
||||
if (array_key_exists('item', $params) && in_array($params['item']['verb'], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) {
|
||||
if (!($vnotify & VNOTIFY_LIKE)) {
|
||||
|
|
Loading…
Reference in a new issue