aboutsummaryrefslogtreecommitdiffstats
path: root/include/ItemObject.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-02-10 00:11:37 -0800
committerfriendica <info@friendica.com>2015-02-10 00:11:37 -0800
commit81e7b47b76e6cc72995e910190e4164d28ec5664 (patch)
tree5cc764df8547d529bf52c06ac30981332db47b3f /include/ItemObject.php
parentc69494524590b7ffa07fcab6780c603ded2cb720 (diff)
downloadvolse-hubzilla-81e7b47b76e6cc72995e910190e4164d28ec5664.tar.gz
volse-hubzilla-81e7b47b76e6cc72995e910190e4164d28ec5664.tar.bz2
volse-hubzilla-81e7b47b76e6cc72995e910190e4164d28ec5664.zip
more progress on event confirmations
Diffstat (limited to 'include/ItemObject.php')
-rw-r--r--include/ItemObject.php9
1 files changed, 7 insertions, 2 deletions
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'],