diff options
author | Mario <mario@mariovavti.com> | 2022-10-12 09:47:47 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-10-12 09:47:47 +0000 |
commit | a83d2efe84c40b5440e96e1f55c6bce1f7d50232 (patch) | |
tree | 95ca98fd8daa7db77a47f975d006cc882e7817b8 | |
parent | d3856caf81c96b1ea2615a375122ca85e91a6fb3 (diff) | |
download | volse-hubzilla-a83d2efe84c40b5440e96e1f55c6bce1f7d50232.tar.gz volse-hubzilla-a83d2efe84c40b5440e96e1f55c6bce1f7d50232.tar.bz2 volse-hubzilla-a83d2efe84c40b5440e96e1f55c6bce1f7d50232.zip |
remove dead code and deal with conv privacy mismatches in Activity::store()
-rw-r--r-- | Zotlabs/Lib/Activity.php | 31 | ||||
-rw-r--r-- | view/de-de/hstrings.php | 2 |
2 files changed, 19 insertions, 14 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 4ff13bc04..8afdb723a 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -2995,18 +2995,6 @@ class Activity { set_iconfig($item, 'activitypub', 'recips', $act->raw_recips); - // TODO: inheritPrivacy should probably be set in encode activity. Zap does not do so yet - check what this is about - if (!(isset($act->data['inheritPrivacy']) && $act->data['inheritPrivacy'])) { - if ($item['item_private']) { - $item['item_restrict'] = $item['item_restrict'] & 1; - if ($is_child_node) { - $item['allow_cid'] = '<' . $channel['channel_hash'] . '>'; - $item['allow_gid'] = $item['deny_cid'] = $item['deny_gid'] = ''; - } - logger('restricted'); - } - } - if (intval($act->sigok)) { $item['item_verified'] = 1; } @@ -3054,7 +3042,24 @@ class Activity { $item['thr_parent'] = $parent[0]['parent_mid']; } $item['parent_mid'] = $parent[0]['parent_mid']; - //$item['item_private'] = $parent[0]['item_private']; + + /* + * + * Check for conversation privacy mismatches + * We can only do this if we have a channel and we have fetched the parent + * + */ + + // public conversation, but this comment went rogue and was published privately + // hide it from everybody except the channel owner + + if (intval($parent[0]['item_private']) === 0) { + if (intval($item['item_private'])) { + $item['item_restrict'] = $item['item_restrict'] | 1; + $item['allow_cid'] = '<' . $channel['channel_hash'] . '>'; + $item['allow_gid'] = $item['deny_cid'] = $item['deny_gid'] = ''; + } + } } diff --git a/view/de-de/hstrings.php b/view/de-de/hstrings.php index df3e25bb8..79fb84bf4 100644 --- a/view/de-de/hstrings.php +++ b/view/de-de/hstrings.php @@ -1832,7 +1832,7 @@ App::$strings["Your old login email address"] = "Deine alte Login-E-Mail-Adresse App::$strings["Your old login password"] = "Dein altes Passwort"; App::$strings["Import your items and files (limited by available memory)"] = "Importieren Sie Ihre Objekte und Dateien (begrenzt durch den verfügbaren Speicher)"; App::$strings["For either option, please choose whether to make this hub your new primary address, or whether your old location should continue this role. You will be able to post from either location, but only one can be marked as the primary location for files, photos, and media."] = "Egal, welche Option Du wählst – bitte lege fest, ob dieser Server die neue primäre Adresse dieses Kanals sein soll, oder ob der bisherige \$Projectname-Hub diese Rolle weiterhin wahrnimmt. Du kannst von beiden Servern aus posten, aber nur einer kann der primäre Ort Deiner Dateien, Fotos und Medien sein."; -App::$strings["Make this hub my primary location"] = "Dieser $Pojectname-Hub ist mein primärer Hub."; +App::$strings["Make this hub my primary location"] = "Dieser \$Projectname-Hub ist mein primärer Hub."; App::$strings["Move this channel (disable all previous locations)"] = "Verschiebe diesen Kanal (deaktiviere alle vorherigen Adressen/Klone)"; App::$strings["Use this channel nickname instead of the one provided"] = "Benutze diese Kanal-Kennung anstelle der hinterlegten."; App::$strings["Leave blank to keep your existing channel nickname. You will be randomly assigned a similar nickname if either name is already allocated on this site."] = "Leerlassen, um die existierende Kanal-Kennung beizubehalten. Es wird eine vergleichbare Kennung zufällig zugewiesen, falls der Name schon auf dieser Seite belegt ist."; |