summaryrefslogtreecommitdiffstats
path: root/apps/contactsinteraction
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2022-02-09 09:43:57 +0100
committerThomas Citharel <tcit@tcit.fr>2022-02-09 09:43:57 +0100
commitc47c0b90d9e5c99d72301b42bf02bf1e8fce6470 (patch)
tree437f9abb3b493c9e8bd265318d61e54d0b374944 /apps/contactsinteraction
parentf4c719734a1939b846929a9a8303b26f5b7a3ed6 (diff)
downloadnextcloud-server-c47c0b90d9e5c99d72301b42bf02bf1e8fce6470.tar.gz
nextcloud-server-c47c0b90d9e5c99d72301b42bf02bf1e8fce6470.zip
Ignore contact interaction with self
No need to insert ourselves as a recent contact Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'apps/contactsinteraction')
-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(),