aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-09-27 08:59:08 +0000
committerMario <mario@mariovavti.com>2022-09-27 08:59:08 +0000
commit2f21dc50b4887f7397f0124245f4bdbf22241a81 (patch)
tree4bb65bc25fc319174193f622e1279b35f103d05c /Zotlabs/Module
parent03475bfb15637d61698e1b3350f7b98654637fc6 (diff)
downloadvolse-hubzilla-2f21dc50b4887f7397f0124245f4bdbf22241a81.tar.gz
volse-hubzilla-2f21dc50b4887f7397f0124245f4bdbf22241a81.tar.bz2
volse-hubzilla-2f21dc50b4887f7397f0124245f4bdbf22241a81.zip
fix mod poke
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Poke.php31
1 files changed, 8 insertions, 23 deletions
diff --git a/Zotlabs/Module/Poke.php b/Zotlabs/Module/Poke.php
index d60a7f426..596de58a3 100644
--- a/Zotlabs/Module/Poke.php
+++ b/Zotlabs/Module/Poke.php
@@ -3,6 +3,7 @@ namespace Zotlabs\Module; /** @file */
use App;
use Zotlabs\Lib\Apps;
+use Zotlabs\Lib\Activity;
use Zotlabs\Web\Controller;
/**
@@ -107,11 +108,6 @@ class Poke extends Controller {
$deny_gid = (($item_private) ? '' : $channel['channel_deny_gid']);
}
-
- $arr = array();
-
-
-
$arr['item_wall'] = 1;
$arr['owner_xchan'] = (($parent_item) ? $parent_item['owner_xchan'] : $channel['channel_hash']);
$arr['parent_mid'] = (($parent_mid) ? $parent_mid : '');
@@ -122,26 +118,15 @@ class Poke extends Controller {
$arr['deny_gid'] = $deny_gid;
$arr['verb'] = $activity;
$arr['item_private'] = $item_private;
- $arr['obj_type'] = ACTIVITY_OBJ_PERSON;
+ $arr['obj_type'] = ACTIVITY_OBJ_NOTE;
$arr['body'] = '[zrl=' . $channel['xchan_url'] . ']' . $channel['xchan_name'] . '[/zrl]' . ' ' . t($verbs[$verb][0]) . ' ' . '[zrl=' . $target['xchan_url'] . ']' . $target['xchan_name'] . '[/zrl]';
-
- $obj = array(
- 'type' => ACTIVITY_OBJ_PERSON,
- 'title' => $target['xchan_name'],
- 'id' => $target['xchan_hash'],
- 'link' => array(
- array('rel' => 'alternate', 'type' => 'text/html', 'href' => $target['xchan_url']),
- array('rel' => 'photo', 'type' => $target['xchan_photo_mimetype'], 'href' => $target['xchan_photo_l'])
- ),
- );
-
- $arr['obj'] = json_encode($obj);
-
$arr['item_origin'] = 1;
$arr['item_wall'] = 1;
$arr['item_unseen'] = 1;
if(! $parent_item)
- $item['item_thread_top'] = 1;
+ $arr['item_thread_top'] = 1;
+
+ $arr['obj'] = Activity::encode_item($arr);
post_activity_item($arr);
@@ -198,8 +183,8 @@ class Poke extends Controller {
$desc = t('Poke somebody');
}
else {
- $title = t('Poke/Prod');
- $desc = t('Poke, prod or do other things to somebody');
+ $title = t('Poke');
+ $desc = t('Poke or ping somebody');
}
$o = replace_macros(get_markup_template('poke_content.tpl'),array(
@@ -207,7 +192,7 @@ class Poke extends Controller {
'$poke_basic' => $poke_basic,
'$desc' => $desc,
'$clabel' => t('Recipient'),
- '$choice' => t('Choose what you wish to do to recipient'),
+ '$choice' => t('Choose action'),
'$verbs' => $shortlist,
'$parent' => $parent,
'$prv_desc' => t('Make this post private'),