mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-11 01:24:27 +02:00
notifications - add attendance notifications
This commit is contained in:
parent
bcee356f66
commit
6d3c15fe91
3 changed files with 40 additions and 4 deletions
|
@ -246,7 +246,6 @@ class NotificationsManager {
|
|||
switch($it['verb']){
|
||||
case ACTIVITY_LIKE:
|
||||
$notif = array(
|
||||
//'$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
|
||||
'label' => 'like',
|
||||
'link' => $this->a->get_baseurl(true).'/display/'.$it['pguid'],
|
||||
'$image' => proxy_url($it['author-avatar'], false, PROXY_SIZE_MICRO),
|
||||
|
@ -258,7 +257,6 @@ class NotificationsManager {
|
|||
|
||||
case ACTIVITY_DISLIKE:
|
||||
$notif = array(
|
||||
//'$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
|
||||
'label' => 'dislike',
|
||||
'link' => $this->a->get_baseurl(true).'/display/'.$it['pguid'],
|
||||
'image' => proxy_url($it['author-avatar'], false, PROXY_SIZE_MICRO),
|
||||
|
@ -268,13 +266,45 @@ class NotificationsManager {
|
|||
);
|
||||
break;
|
||||
|
||||
case ACTIVITY_ATTEND:
|
||||
$notif = array(
|
||||
'label' => 'attend',
|
||||
'link' => $this->a->get_baseurl(true).'/display/'.$it['pguid'],
|
||||
'image' => proxy_url($it['author-avatar'], false, PROXY_SIZE_MICRO),
|
||||
'text' => sprintf( t("%s is attending %s's event"), $it['author-name'], $it['pname']),
|
||||
'when' => relative_date($it['created']),
|
||||
'seen' => $it['seen']
|
||||
);
|
||||
break;
|
||||
|
||||
case ACTIVITY_ATTENDNO:
|
||||
$notif = array(
|
||||
'label' => 'attendno',
|
||||
'link' => $this->a->get_baseurl(true).'/display/'.$it['pguid'],
|
||||
'image' => proxy_url($it['author-avatar'], false, PROXY_SIZE_MICRO),
|
||||
'text' => sprintf( t("%s is not attending %s's event"), $it['author-name'], $it['pname']),
|
||||
'when' => relative_date($it['created']),
|
||||
'seen' => $it['seen']
|
||||
);
|
||||
break;
|
||||
|
||||
case ACTIVITY_ATTENDMAYBE:
|
||||
$notif = array(
|
||||
'label' => 'attendmaybe',
|
||||
'link' => $this->a->get_baseurl(true).'/display/'.$it['pguid'],
|
||||
'image' => proxy_url($it['author-avatar'], false, PROXY_SIZE_MICRO),
|
||||
'text' => sprintf( t("%s may attend %s's event"), $it['author-name'], $it['pname']),
|
||||
'when' => relative_date($it['created']),
|
||||
'seen' => $it['seen']
|
||||
);
|
||||
break;
|
||||
|
||||
case ACTIVITY_FRIEND:
|
||||
$xmlhead="<"."?xml version='1.0' encoding='UTF-8' ?".">";
|
||||
$obj = parse_xml_string($xmlhead.$it['object']);
|
||||
$it['fname'] = $obj->title;
|
||||
|
||||
$notif = array(
|
||||
//'$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
|
||||
'label' => 'friend',
|
||||
'link' => $this->a->get_baseurl(true).'/display/'.$it['pguid'],
|
||||
'image' => proxy_url($it['author-avatar'], false, PROXY_SIZE_MICRO),
|
||||
|
@ -286,7 +316,6 @@ class NotificationsManager {
|
|||
|
||||
default:
|
||||
$notif = array(
|
||||
//'$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
|
||||
'label' => $default_item_label,
|
||||
'link' => $default_item_link,
|
||||
'image' => $default_item_image,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue