aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Libzot.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-09-06 19:22:39 +0000
committerMario <mario@mariovavti.com>2021-09-06 19:22:39 +0000
commitc1ce211b566a68b02f1197ef1bd0fc79385c1c48 (patch)
tree81d8b40691e73abcb5e988cd42d11d6a1e396c60 /Zotlabs/Lib/Libzot.php
parent3d40ea7f4417a1134dc53cc2e804af13370cd57b (diff)
parent1aa782633184f41733778ce75139f0d9a890e1e3 (diff)
downloadvolse-hubzilla-c1ce211b566a68b02f1197ef1bd0fc79385c1c48.tar.gz
volse-hubzilla-c1ce211b566a68b02f1197ef1bd0fc79385c1c48.tar.bz2
volse-hubzilla-c1ce211b566a68b02f1197ef1bd0fc79385c1c48.zip
Merge branch 'dev' into 6.2RC
Diffstat (limited to 'Zotlabs/Lib/Libzot.php')
-rw-r--r--Zotlabs/Lib/Libzot.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php
index f7d8c417a..9c232f34d 100644
--- a/Zotlabs/Lib/Libzot.php
+++ b/Zotlabs/Lib/Libzot.php
@@ -1601,6 +1601,12 @@ class Libzot {
$friendofriend = true;
}
+ if (intval($arr['item_private']) === 2) {
+ if (!perm_is_allowed($channel['channel_id'], $sender, 'post_mail')) {
+ $allowed = false;
+ }
+ }
+
if (!$allowed) {
logger("permission denied for delivery to channel {$channel['channel_id']} {$channel['channel_address']}");
$DR->update('permission denied');
@@ -3154,4 +3160,10 @@ class Libzot {
}
+ static function update_cached_hubloc($hubloc) {
+ if ($hubloc['hubloc_updated'] > datetime_convert('UTC','UTC','now - 1 week') || $hubloc['hubloc_url'] === z_root()) {
+ return;
+ }
+ self::refresh( [ 'hubloc_id_url' => $hubloc['hubloc_id_url'] ] );
+ }
}