Merge branch 'dev' of /home/macgirvin/zap.macgirvin.com into zap

This commit is contained in:
zotlabs 2018-09-17 22:53:38 -07:00
commit f6c5e9e610
4 changed files with 14 additions and 10 deletions

View file

@ -48,7 +48,7 @@ class Activity {
if(! $r)
return [];
return self::encode_person($r[0]);
return self::encode_person($r[0],false);
}

View file

@ -1,6 +1,9 @@
<?php
namespace Zotlabs\Module;
use Zotlabs\Lib\Activity;
use Zotlabs\Access\AccessList;
/*
@file cover_photo.php
@brief Module-file with functions for handling of cover-photos
@ -258,7 +261,7 @@ logger('gis: ' . print_r($gis,true));
$arr['item_origin'] = 1;
$arr['item_wall'] = 1;
$arr['mid'] = item_message_id();
$arr['obj_type'] = ACTIVITY_OBJ_PHOTO;
$arr['obj_type'] = ACTIVITY_OBJ_NOTE;
$arr['verb'] = ACTIVITY_UPDATE;
if($profile && stripos($profile['gender'],t('female')) !== false)
@ -275,17 +278,17 @@ logger('gis: ' . print_r($gis,true));
$arr['body'] = sprintf($t,$channel['channel_name'],$ptext) . "\n\n" . $ltext;
$arr['obj'] = [
'type' => ACTIVITY_OBJ_PHOTO,
'type' => ACTIVITY_OBJ_NOTE,
'published' => datetime_convert('UTC','UTC',$photo['created'],ATOM_TIME),
'updated' => datetime_convert('UTC','UTC',$photo['edited'],ATOM_TIME),
'id' => $arr['mid'],
'url' => [ 'type' => 'Link', 'mediaType' => $photo['mimetype'], 'href' => z_root() . '/photo/' . $photo['resource_id'] . '-7' ],
'source' => [ 'content' => $arr['body'], 'mediaType' => 'text/bbcode' ],
'content' => bbcode($arr['body']),
'actor' => \Zotlabs\Lib\Activity::encode_person($channel),
'actor' => Activity::encode_person($channel,false),
];
$acl = new \Zotlabs\Access\AccessList($channel);
$acl = new AccessList($channel);
$x = $acl->get();
$arr['allow_cid'] = $x['allow_cid'];

View file

@ -6,6 +6,7 @@
use Sabre\VObject;
use Zotlabs\Lib\Libsync;
use Zotlabs\Lib\Activity;
require_once('include/bbcode.php');
@ -1038,7 +1039,7 @@ function event_store_item($arr, $event) {
'location' => [ 'type' => 'Place', 'content' => $arr['location'] ],
'content' => format_event_html($arr),
'source' => [ 'content' => format_event_bbcode($arr), 'mediaType' => 'text/bbcode' ],
'actor' => \Zotlabs\Lib\Activity::encode_person($r[0]),
'actor' => Activity::encode_person($r[0],false),
];
if(! $arr['nofinish']) {
@ -1183,7 +1184,7 @@ function event_store_item($arr, $event) {
'location' => [ 'type' => 'Place', 'content' => bbcode($arr['location']) ],
'content' => format_event_html($arr),
'source' => [ 'content' => format_event_bbcode($arr), 'mediaType' => 'text/bbcode' ],
'actor' => \Zotlabs\Lib\Activity::encode_person($z),
'actor' => Activity::encode_person($z,false),
];
if(! $arr['nofinish']) {

View file

@ -4546,7 +4546,7 @@ function send_profile_photo_activity($channel,$photo,$profile) {
$arr['item_thread_top'] = 1;
$arr['item_origin'] = 1;
$arr['item_wall'] = 1;
$arr['obj_type'] = ACTIVITY_OBJ_PHOTO;
$arr['obj_type'] = ACTIVITY_OBJ_NOTE;
$arr['verb'] = ACTIVITY_UPDATE;
$arr['mid'] = item_message_id();
@ -4565,14 +4565,14 @@ function send_profile_photo_activity($channel,$photo,$profile) {
$arr['obj'] = [
'type' => ACTIVITY_OBJ_PHOTO,
'type' => ACTIVITY_OBJ_NOTE,
'published' => datetime_convert('UTC','UTC',$photo['created'],ATOM_TIME),
'updated' => datetime_convert('UTC','UTC',$photo['edited'],ATOM_TIME),
'id' => $arr['mid'],
'url' => [ 'type' => 'Link', 'mediaType' => $photo['mimetype'], 'href' => z_root() . '/photo/profile/l/' . $channel['channel_id'] ],
'source' => [ 'content' => $arr['body'], 'mediaType' => 'text/bbcode' ],
'content' => bbcode($arr['body']),
'actor' => \Zotlabs\Lib\Activity::encode_person($channel),
'actor' => Activity::encode_person($channel,false),
];
$acl = new AccessList($channel);