From 91b710b07d5fc2b48b5d56d1801a36532008d1e9 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 15 Mar 2018 17:51:24 -0700 Subject: add auth flag to share attributes so we can make a costly determination to use zid at post submission time instead of making multiple calls to is_matrix_url() at render time --- Zotlabs/Lib/Share.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'Zotlabs/Lib/Share.php') diff --git a/Zotlabs/Lib/Share.php b/Zotlabs/Lib/Share.php index b5341e662..e9e4d23c4 100644 --- a/Zotlabs/Lib/Share.php +++ b/Zotlabs/Lib/Share.php @@ -123,11 +123,13 @@ class Share { $bb = substr($this->item['body'], $pos); } else { $bb = "[share author='".urlencode($this->item['author']['xchan_name']). - "' profile='".$this->item['author']['xchan_url'] . - "' avatar='".$this->item['author']['xchan_photo_s']. - "' link='".$this->item['plink']. - "' posted='".$this->item['created']. - "' message_id='".$this->item['mid']."']"; + "' profile='" . $this->item['author']['xchan_url'] . + "' avatar='" . $this->item['author']['xchan_photo_s'] . + "' link='" . $this->item['plink'] . + "' auth='" . (($this->item['author']['network'] === 'zot') ? 'true' : 'false') . + "' posted='" . $this->item['created'] . + "' message_id='" . $this->item['mid'] . + "']"; if($this->item['title']) $bb .= '[b]'.$this->item['title'].'[/b]'."\r\n"; $bb .= (($is_photo) ? $photo_bb . "\r\n" . $this->item['body'] : $this->item['body']); -- cgit v1.2.3