From 81e7b47b76e6cc72995e910190e4164d28ec5664 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 10 Feb 2015 00:11:37 -0800 Subject: more progress on event confirmations --- include/ItemObject.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'include/ItemObject.php') diff --git a/include/ItemObject.php b/include/ItemObject.php index 8f1112f6a..3638b2ffb 100644 --- a/include/ItemObject.php +++ b/include/ItemObject.php @@ -134,16 +134,19 @@ class Item extends BaseObject { $profile_name = $item['author']['xchan_name']; $location = format_location($item); - + $isevent = false; + $attend = null; // process action responses - e.g. like/dislike/attend/agree/whatever $response_verbs = array('like'); if(feature_enabled($conv->get_profile_owner(),'dislike')) $response_verbs[] = 'dislike'; - if($item['resource_type'] === 'event') { + if($item['obj_type'] === ACTIVITY_OBJ_EVENT) { $response_verbs[] = 'attendyes'; $response_verbs[] = 'attendno'; $response_verbs[] = 'attendmaybe'; + $isevent = true; + $attend = array( t('I will attend'), t('I will not attend'), t('I might attend')); } $consensus = (($item['item_flags'] & ITEM_CONSENSUS)? true : false); if($consensus) { @@ -275,6 +278,8 @@ class Item extends BaseObject { 'body' => $body, 'text' => strip_tags($body), 'id' => $this->get_id(), + 'isevent' => $isevent, + 'attend' => $attend, 'linktitle' => sprintf( t('View %s\'s profile - %s'), $profile_name, $item['author']['xchan_addr']), 'olinktitle' => sprintf( t('View %s\'s profile - %s'), $this->get_owner_name(), $item['owner']['xchan_addr']), 'llink' => $item['llink'], -- cgit v1.2.3