summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php
index f6d5440f0..4fb58e7dc 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -1401,6 +1401,11 @@ function common_save_replies($notice) {
$notice->update($orig);
}
}
+ # Don't save replies from blocked profile to local user
+ $recipient_user = User::staticGet('id', $recipient->id);
+ if ($recipient_user && $recipient_user->hasBlocked($sender)) {
+ continue;
+ }
$reply = new Reply();
$reply->notice_id = $notice->id;
$reply->profile_id = $recipient->id;
@@ -1422,6 +1427,11 @@ function common_save_replies($notice) {
$tagged = Profile_tag::getTagged($sender->id, $tag);
foreach ($tagged as $t) {
if (!$replied[$t->id]) {
+ # Don't save replies from blocked profile to local user
+ $t_user = User::staticGet('id', $t->id);
+ if ($t_user && $t_user->hasBlocked($sender)) {
+ continue;
+ }
$reply = new Reply();
$reply->notice_id = $notice->id;
$reply->profile_id = $t->id;