aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2019-09-16 23:27:41 -0700
committerzotlabs <mike@macgirvin.com>2019-09-16 23:27:41 -0700
commit375c2a87c73b0f5a257000a7ec036b1d16c0092b (patch)
tree6a08d33bdf9554c2d489f9139bc9d0564f829209
parentd9052c7e3cba157c1465125bcc5e1e0c9b98f8aa (diff)
downloadvolse-hubzilla-375c2a87c73b0f5a257000a7ec036b1d16c0092b.tar.gz
volse-hubzilla-375c2a87c73b0f5a257000a7ec036b1d16c0092b.tar.bz2
volse-hubzilla-375c2a87c73b0f5a257000a7ec036b1d16c0092b.zip
change event formatting slightly for Zot6 and ActivityStreams.
-rw-r--r--Zotlabs/Lib/Activity.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index f9ec3a677..ed29bfe6d 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -6,6 +6,7 @@ use Zotlabs\Daemon\Master;
use Zotlabs\Web\HTTPSig;
require_once('include/event.php');
+require_once('include/html2plain.php');
class Activity {
@@ -204,7 +205,8 @@ class Activity {
$y = [
'type' => 'Event',
'id' => z_root() . '/event/' . $ev['event_hash'],
- 'summary' => bbcode($ev['summary'], [ 'cache' => true ]),
+ 'name' => $ev['summary'],
+// 'summary' => bbcode($ev['summary'], [ 'cache' => true ]),
// RFC3339 Section 4.3
'startTime' => (($ev['adjust']) ? datetime_convert('UTC','UTC',$ev['dtstart'], ATOM_TIME) : datetime_convert('UTC','UTC',$ev['dtstart'],'Y-m-d\\TH:i:s-00:00')),
'content' => bbcode($ev['description'], [ 'cache' => true ]),
@@ -2559,7 +2561,12 @@ class Activity {
}
if($event) {
- $event['summary'] = html2bbcode($content['summary']);
+ $event['summary'] = $content['name'];
+ if(! $event['summary']) {
+ if($content['summary']) {
+ $event['summary'] = html2plain($content['summary']);
+ }
+ }
$event['description'] = html2bbcode($content['content']);
if($event['summary'] && $event['dtstart']) {
$content['event'] = $event;