Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2022-02-09 11:43:57 +0300
committerThomas Citharel <tcit@tcit.fr>2022-02-09 11:43:57 +0300
commitc47c0b90d9e5c99d72301b42bf02bf1e8fce6470 (patch)
tree437f9abb3b493c9e8bd265318d61e54d0b374944
parentf4c719734a1939b846929a9a8303b26f5b7a3ed6 (diff)
Ignore contact interaction with self
No need to insert ourselves as a recent contact Signed-off-by: Thomas Citharel <tcit@tcit.fr>
-rw-r--r--apps/contactsinteraction/lib/Listeners/ContactInteractionListener.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/contactsinteraction/lib/Listeners/ContactInteractionListener.php b/apps/contactsinteraction/lib/Listeners/ContactInteractionListener.php
index 21991007ee7..333a6393920 100644
--- a/apps/contactsinteraction/lib/Listeners/ContactInteractionListener.php
+++ b/apps/contactsinteraction/lib/Listeners/ContactInteractionListener.php
@@ -84,6 +84,11 @@ class ContactInteractionListener implements IEventListener {
return;
}
+ if ($event->getUid() !== null && $event->getUid() === $event->getActor()->getUID()) {
+ $this->logger->info("Ignoring contact interaction with self");
+ return;
+ }
+
$existing = $this->mapper->findMatch(
$event->getActor(),
$event->getUid(),