diff options
author | Max Kostikov <max@kostikov.co> | 2019-12-03 10:26:49 +0100 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2019-12-03 10:26:49 +0100 |
commit | 0532d639c29ad03d235fd93b5e442ec7a7a88f48 (patch) | |
tree | 0bd9eb98b264d94e09edf2ce328d7cd4fa2ee05c /Zotlabs/Widget/Pinned.php | |
parent | c17717c5dbba37ec598903706095f2c3905a843c (diff) | |
download | volse-hubzilla-0532d639c29ad03d235fd93b5e442ec7a7a88f48.tar.gz volse-hubzilla-0532d639c29ad03d235fd93b5e442ec7a7a88f48.tar.bz2 volse-hubzilla-0532d639c29ad03d235fd93b5e442ec7a7a88f48.zip |
Optimize pinned item verbs based activity processing
Diffstat (limited to 'Zotlabs/Widget/Pinned.php')
-rw-r--r-- | Zotlabs/Widget/Pinned.php | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/Zotlabs/Widget/Pinned.php b/Zotlabs/Widget/Pinned.php index e2dc49018..f200e1378 100644 --- a/Zotlabs/Widget/Pinned.php +++ b/Zotlabs/Widget/Pinned.php @@ -55,12 +55,12 @@ class Pinned { $attend = null; $canvote = false; - $response_verbs = []; + $conv_responses = []; if($item['obj_type'] === ACTIVITY_OBJ_EVENT) { - $response_verbs[] = 'attendyes'; - $response_verbs[] = 'attendno'; - $response_verbs[] = 'attendmaybe'; + $conv_responses['attendyes'] = [ 'title' => t('Attending','title') ]; + $conv_responses['attendno'] = [ 'title' => t('Not attending','title') ]; + $conv_responses['attendmaybe'] = [ 'title' => t('Might attend','title') ]; if($commentable && $observer) { $attend = array( t('I will attend'), t('I will not attend'), t('I might attend')); $isevent = true; @@ -69,24 +69,15 @@ class Pinned { $consensus = (intval($item['item_consensus']) ? true : false); if($consensus) { - $response_verbs[] = 'agree'; - $response_verbs[] = 'disagree'; - $response_verbs[] = 'abstain'; + $conv_responses['agree'] = [ 'title' => t('Agree','title') ]; + $conv_responses['disagree'] = [ 'title' => t('Disagree','title') ]; + $conv_responses['abstain'] = [ 'title' => t('Abstain','title') ]; if($commentable && $observer) { $conlabels = array( t('I agree'), t('I disagree'), t('I abstain')); $canvote = true; } } - $conv_responses = [ - 'agree' => [ 'title' => t('Agree','title') ], - 'disagree' => [ 'title' => t('Disagree','title') ], - 'abstain' => [ 'title' => t('Abstain','title') ], - 'attendyes' => [ 'title' => t('Attending','title') ], - 'attendno' => [ 'title' => t('Not attending','title') ], - 'attendmaybe' => [ 'title' => t('Might attend','title') ] - ]; - $this->activity($item, $conv_responses); $verified = (intval($item['item_verified']) ? t('Message signature validated') : ''); |