diff options
author | Mario <mario@mariovavti.com> | 2022-11-09 09:27:33 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-11-09 09:27:33 +0000 |
commit | b713c9a491c02725f79a1ef85a01b65c2968bd2d (patch) | |
tree | bd2f1b2ffbea90647e4efde01d23eaa18d202d4c /Zotlabs/Module | |
parent | 057db41758daf85a1506fff8e5332db2dc62b2b9 (diff) | |
download | volse-hubzilla-b713c9a491c02725f79a1ef85a01b65c2968bd2d.tar.gz volse-hubzilla-b713c9a491c02725f79a1ef85a01b65c2968bd2d.tar.bz2 volse-hubzilla-b713c9a491c02725f79a1ef85a01b65c2968bd2d.zip |
fix new uuid created when editing post
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r-- | Zotlabs/Module/Item.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index a5e7b31ea..8e6106e79 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -393,7 +393,7 @@ class Item extends Controller { $owner_hash = null; - $message_id = ((x($_REQUEST, 'message_id') && $api_source) ? strip_tags($_REQUEST['message_id']) : ''); + $message_id = ((x($_REQUEST, 'message_id') && $api_source) ? strip_tags($_REQUEST['message_id']) : null); $created = ((x($_REQUEST, 'created')) ? datetime_convert(date_default_timezone_get(), 'UTC', $_REQUEST['created']) : datetime_convert()); $post_id = ((x($_REQUEST, 'post_id')) ? intval($_REQUEST['post_id']) : 0); $app = ((x($_REQUEST, 'source')) ? strip_tags($_REQUEST['source']) : ''); @@ -710,6 +710,7 @@ class Item extends Controller { $expires = $orig_post['expires']; $comments_closed = $orig_post['comments_closed']; $mid = $orig_post['mid']; + $uuid = $orig_post['uuid']; $thr_parent = $orig_post['thr_parent']; $parent_mid = $orig_post['parent_mid']; $plink = $orig_post['plink']; @@ -1000,10 +1001,8 @@ class Item extends Controller { $notify_type = (($parent) ? 'comment-new' : 'wall-new'); - $uuid = (($message_id) ? $message_id : item_message_id()); - - $mid = $mid ?? z_root() . '/item/' . $uuid; - + $uuid = $uuid ?? $message_id ?? item_message_id(); + $mid = $mid ?? z_root() . '/item/' . $uuid; if ($is_poll) { $poll = [ |