aboutsummaryrefslogtreecommitdiffstats
path: root/include/notifier.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-08-14 20:09:02 -0700
committerfriendica <info@friendica.com>2013-08-14 20:09:02 -0700
commitac541a7d3246e1c5c60ae752326c1b9ba5ccd78f (patch)
tree73fa695d51bd08a3addf13ebf8873463e32708b6 /include/notifier.php
parentde4e4c5ebd1ab746432b21d122b5f0cfb70a9bdd (diff)
downloadvolse-hubzilla-ac541a7d3246e1c5c60ae752326c1b9ba5ccd78f.tar.gz
volse-hubzilla-ac541a7d3246e1c5c60ae752326c1b9ba5ccd78f.tar.bz2
volse-hubzilla-ac541a7d3246e1c5c60ae752326c1b9ba5ccd78f.zip
most of expire is now ported from friendica, but the protocol bits to push out the delete notifications for the entire batch to all recipients of the original post are not complete and will take quite a bit more work. As a consequence, expire has been completely disabled until it is fully implmented since it could result in completely un-removable posts reminiscent of the infamous "Bonnie Nadri" incident at Diaspora which we do not wish to re-live.
Diffstat (limited to 'include/notifier.php')
-rw-r--r--include/notifier.php19
1 files changed, 15 insertions, 4 deletions
diff --git a/include/notifier.php b/include/notifier.php
index a0c07200a..2a0301357 100644
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -54,6 +54,7 @@ require_once('include/html2plain.php');
* ZOT
* permission_update abook_id
* refresh_all channel_id
+ * expire channel_id
* relay item_id (item was relayed to owner, we will deliver it as owner)
*
*/
@@ -166,14 +167,24 @@ function notifier_run($argv, $argc){
elseif($cmd === 'expire') {
$normal_mode = false;
$expire = true;
- $items = q("SELECT * FROM `item` WHERE `uid` = %d AND `wall` = 1
- AND `deleted` = 1 AND `changed` > UTC_TIMESTAMP() - INTERVAL 10 MINUTE",
- intval($item_id)
+ $items = q("SELECT * FROM item WHERE uid = %d AND ( item_flags & %d )
+ AND ( item_restrict & %d ) AND `changed` > UTC_TIMESTAMP() - INTERVAL 10 MINUTE",
+ intval($item_id),
+ intval(ITEM_WALL),
+ intval(ITEM_DELETED)
);
$uid = $item_id;
$item_id = 0;
- if(! count($items))
+ if(! $items)
return;
+
+// FIXME
+// This will require a special zot packet containing a list of item message_id's to be expired.
+// This packet will be public, since we cannot selectively deliver here.
+// We need the handling on this end to create the array, and the handling on the remote end
+// to verify permissions (for each item) and process it. Until this is complete, the expire feature will be disabled.
+
+ return;
}
elseif($cmd === 'suggest') {
$normal_mode = false;