aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Lib/Activity.php2
-rw-r--r--Zotlabs/Lib/ThreadItem.php4
-rw-r--r--Zotlabs/Module/Like.php2
-rw-r--r--Zotlabs/Widget/Pinned.php2
-rw-r--r--include/event.php2
-rw-r--r--include/text.php3
6 files changed, 8 insertions, 7 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index d596b47a0..9a9a6d02c 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -2215,7 +2215,7 @@ class Activity {
}
static function decode_note($act) {
-
+//hz_syslog(print_r($act,true));
$response_activity = false;
$s = [];
diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php
index d1b386c42..cf877ed92 100644
--- a/Zotlabs/Lib/ThreadItem.php
+++ b/Zotlabs/Lib/ThreadItem.php
@@ -197,7 +197,7 @@ class ThreadItem {
$response_verbs = array('like');
if(feature_enabled($conv->get_profile_owner(),'dislike'))
$response_verbs[] = 'dislike';
- if($item['obj_type'] === ACTIVITY_OBJ_EVENT) {
+ if(in_array($item['obj_type'], ['Event', ACTIVITY_OBJ_EVENT])) {
$response_verbs[] = 'attendyes';
$response_verbs[] = 'attendno';
$response_verbs[] = 'attendmaybe';
@@ -299,7 +299,7 @@ class ThreadItem {
}
$has_event = false;
- if(($item['obj_type'] === ACTIVITY_OBJ_EVENT) && $conv->get_profile_owner() == local_channel())
+ if((in_array($item['obj_type'], ['Event', ACTIVITY_OBJ_EVENT])) && $conv->get_profile_owner() == local_channel())
$has_event = true;
$like = [];
diff --git a/Zotlabs/Module/Like.php b/Zotlabs/Module/Like.php
index 2cf792c8d..486e6b31f 100644
--- a/Zotlabs/Module/Like.php
+++ b/Zotlabs/Module/Like.php
@@ -451,7 +451,7 @@ class Like extends Controller {
}
else {
$post_type = (($item['resource_type'] === 'photo') ? t('photo') : t('status'));
- if ($item['obj_type'] === ACTIVITY_OBJ_EVENT)
+ if (in_array($item['obj_type'], ['Event', ACTIVITY_OBJ_EVENT]))
$post_type = t('event');
$obj_type = (($item['resource_type'] === 'photo') ? ACTIVITY_OBJ_PHOTO : ACTIVITY_OBJ_NOTE);
diff --git a/Zotlabs/Widget/Pinned.php b/Zotlabs/Widget/Pinned.php
index 6d2618deb..bd1c0e462 100644
--- a/Zotlabs/Widget/Pinned.php
+++ b/Zotlabs/Widget/Pinned.php
@@ -67,7 +67,7 @@ class Pinned {
$conv_responses = [];
- if($item['obj_type'] === ACTIVITY_OBJ_EVENT) {
+ if(in_array($item['obj_type'], ['Event', ACTIVITY_OBJ_EVENT])) {
$conv_responses['attendyes'] = [ 'title' => t('Attending','title') ];
$conv_responses['attendno'] = [ 'title' => t('Not attending','title') ];
$conv_responses['attendmaybe'] = [ 'title' => t('Might attend','title') ];
diff --git a/include/event.php b/include/event.php
index 6273279c2..894a1e4f7 100644
--- a/include/event.php
+++ b/include/event.php
@@ -713,7 +713,7 @@ function event_addtocal($item_id, $uid) {
intval($channel['channel_id'])
);
- if((! $r) || ($r[0]['obj_type'] !== ACTIVITY_OBJ_EVENT))
+ if(!$r || !in_array($r[0]['obj_type'], ['Event', ACTIVITY_OBJ_EVENT]))
return false;
$item = $r[0];
diff --git a/include/text.php b/include/text.php
index 13b385e98..d84b36378 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1794,7 +1794,8 @@ function prepare_body(&$item,$attach = false,$opts = false) {
$s = $poll;
}
- $event = (($item['obj_type'] === ACTIVITY_OBJ_EVENT) ? format_event_obj($item['obj']) : []);
+ $event = (in_array($item['obj_type'], ['Event', ACTIVITY_OBJ_EVENT]) ? format_event_obj($item['obj']) : []);
+
$prep_arr = [
'item' => $item,
'html' => $event ? $event['content'] : $s,