aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Item.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-02-25 19:29:50 +0000
committerMario <mario@mariovavti.com>2024-02-25 19:29:50 +0000
commit3dd739424718596b94f5a61d2015388db2491999 (patch)
tree336e19816349b7b0c3d5c4ba49bf4bf19ae4e46a /Zotlabs/Module/Item.php
parentb860b730a9fe718ad35cd918ab237afe42cf386c (diff)
downloadvolse-hubzilla-3dd739424718596b94f5a61d2015388db2491999.tar.gz
volse-hubzilla-3dd739424718596b94f5a61d2015388db2491999.tar.bz2
volse-hubzilla-3dd739424718596b94f5a61d2015388db2491999.zip
AS2
Diffstat (limited to 'Zotlabs/Module/Item.php')
-rw-r--r--Zotlabs/Module/Item.php24
1 files changed, 4 insertions, 20 deletions
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php
index 574dffc69..7d71edc99 100644
--- a/Zotlabs/Module/Item.php
+++ b/Zotlabs/Module/Item.php
@@ -298,7 +298,6 @@ class Item extends Controller {
function post() {
-
// This will change. Figure out who the observer is and whether or not
// they have permission to post here. Else ignore the post.
@@ -405,7 +404,7 @@ class Item extends Controller {
$pagetitle = ((x($_REQUEST, 'pagetitle')) ? escape_tags($_REQUEST['pagetitle']) : '');
$layout_mid = ((x($_REQUEST, 'layout_mid')) ? escape_tags($_REQUEST['layout_mid']) : '');
$plink = ((x($_REQUEST, 'permalink')) ? escape_tags($_REQUEST['permalink']) : '');
- $obj_type = ((x($_REQUEST, 'obj_type')) ? escape_tags($_REQUEST['obj_type']) : ACTIVITY_OBJ_NOTE);
+ $obj_type = ((x($_REQUEST, 'obj_type')) ? escape_tags($_REQUEST['obj_type']) : 'Note');
// allow API to bulk load a bunch of imported items with sending out a bunch of posts.
$nopush = ((x($_REQUEST, 'nopush')) ? intval($_REQUEST['nopush']) : 0);
@@ -444,9 +443,6 @@ class Item extends Controller {
if (!x($_REQUEST, 'type'))
$_REQUEST['type'] = 'net-comment';
- if ($obj_type == ACTIVITY_OBJ_NOTE)
- $obj_type = ACTIVITY_OBJ_COMMENT;
-
if ($parent) {
$r = q("SELECT * FROM item WHERE id = %d LIMIT 1",
intval($parent)
@@ -1008,7 +1004,7 @@ class Item extends Controller {
if (!strlen($verb))
- $verb = ACTIVITY_POST;
+ $verb = 'Create';
$notify_type = (($parent) ? 'comment-new' : 'wall-new');
@@ -1219,18 +1215,6 @@ class Item extends Controller {
$this->add_listeners($datarray);
}
- // We only need edit activities for other federated protocols
- // which do not support edits natively. While this does federate
- // edits, it presents a number of issues locally - such as #757 and #758.
- // The SQL check for an edit activity would not perform that well so to fix these issues
- // requires an additional item flag (perhaps 'item_edit_activity') that we can add to the
- // query for searches and notifications.
-
- // For now we'll just forget about trying to make edits work on network protocols that
- // don't support them.
-
- // item_create_edit_activity($x);
-
if (!$parent) {
$r = q("select * from item where id = %d",
intval($post_id)
@@ -1285,7 +1269,7 @@ class Item extends Controller {
'to_xchan' => $datarray['owner_xchan'],
'item' => $datarray,
'link' => z_root() . '/display/' . $datarray['uuid'],
- 'verb' => ACTIVITY_POST,
+ 'verb' => 'Create',
'otype' => 'item',
'parent' => $parent,
'parent_mid' => $parent_item['mid']
@@ -1303,7 +1287,7 @@ class Item extends Controller {
'to_xchan' => $datarray['owner_xchan'],
'item' => $datarray,
'link' => z_root() . '/display/' . $datarray['uuid'],
- 'verb' => ACTIVITY_POST,
+ 'verb' => 'Create',
'otype' => 'item'
]);
}