new api for notifications
/api/friendica/notification returns first 50 notifications for current user /api/friendica¬ification/<id> set note <id> as seen and return item object if possible new class NotificationsManager to query for notifications and set seen state
This commit is contained in:
parent
d6cf791677
commit
44592611e1
4 changed files with 223 additions and 55 deletions
|
|
@ -206,8 +206,8 @@ function ping_init(&$a) {
|
|||
$local_time = datetime_convert('UTC',date_default_timezone_get(),$n['date']);
|
||||
|
||||
call_hooks('ping_xmlize', $n);
|
||||
$notsxml = '<note href="%s" name="%s" url="%s" photo="%s" date="%s" seen="%s" timestamp="%s" >%s</note>'."\n";
|
||||
return sprintf ( $notsxml,
|
||||
$notsxml = '<note id="%d" href="%s" name="%s" url="%s" photo="%s" date="%s" seen="%s" timestamp="%s" >%s</note>'."\n";
|
||||
return sprintf ( $notsxml, intval($n['id']),
|
||||
xmlify($n['href']), xmlify($n['name']), xmlify($n['url']), xmlify($n['photo']),
|
||||
xmlify(relative_date($n['date'])), xmlify($n['seen']), xmlify(strtotime($local_time)),
|
||||
xmlify($n['message'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue