Diaspora: Now the application name is transmitted as well with a post.

This commit is contained in:
Michael Vogel 2014-04-22 00:58:17 +02:00
parent 10d36c324a
commit 2c3a5d72fd

View file

@ -2309,13 +2309,17 @@ function diaspora_send_status($item,$owner,$contact,$public_batch = false) {
require_once('include/datetime.php'); require_once('include/datetime.php');
$created = datetime_convert('UTC','UTC',$item['created'],'Y-m-d H:i:s \U\T\C'); $created = datetime_convert('UTC','UTC',$item['created'],'Y-m-d H:i:s \U\T\C');
// To-Do
// Detect a share element and do a reshare
// see: https://github.com/Raven24/diaspora-federation/blob/master/lib/diaspora-federation/entities/reshare.rb
$tpl = get_markup_template('diaspora_post.tpl'); $tpl = get_markup_template('diaspora_post.tpl');
$msg = replace_macros($tpl, array( $msg = replace_macros($tpl, array(
'$body' => $body, '$body' => $body,
'$guid' => $item['guid'], '$guid' => $item['guid'],
'$handle' => xmlify($myaddr), '$handle' => xmlify($myaddr),
'$public' => $public, '$public' => $public,
'$created' => $created '$created' => $created,
'$provider' => $item["app"]
)); ));
logger('diaspora_send_status: ' . $owner['username'] . ' -> ' . $contact['name'] . ' base message: ' . $msg, LOGGER_DATA); logger('diaspora_send_status: ' . $owner['username'] . ' -> ' . $contact['name'] . ' base message: ' . $msg, LOGGER_DATA);