Browse Source

Add actions for the Chat and Menu notifications

pull/56/head
Jaussoin Timothée 10 years ago
parent
commit
9137824f03
  1. 9
      app/widgets/Chat/Chat.php
  2. 19
      app/widgets/Menu/Menu.php

9
app/widgets/Chat/Chat.php

@ -72,7 +72,14 @@ class Chat extends WidgetBase
&& $message->type != 'groupchat') {
$avatar = $contact->getPhoto('s');
if($avatar == false) $avatar = null;
Notification::append('chat|'.$from, $contact->getTrueName(), $message->body, $avatar, 4);
Notification::append(
'chat|'.$from,
$contact->getTrueName(),
$message->body,
$avatar,
4,
$this->route('chat', $contact->jid)
);
}
RPC::call('movim_fill', $from.'_state', $contact->jid);

19
app/widgets/Menu/Menu.php

@ -46,9 +46,24 @@ class Menu extends WidgetBase
$title = $post->title;
}
if(!$post->isMine()) Notification::append('news', $contact->getTrueName(), $title, $contact->getPhoto('s'), 2);
if(!$post->isMine())
Notification::append(
'news',
$contact->getTrueName(),
$title,
$contact->getPhoto('s'),
2,
$this->route('news', $post->nodeid)
);
} else {
Notification::append('news', $post->title, $post->node, null, 2);
Notification::append(
'news',
$post->title,
$post->node,
null,
2,
$this->route('news', $post->nodeid)
);
}
$this->onStream($count);

Loading…
Cancel
Save