From c47c0b90d9e5c99d72301b42bf02bf1e8fce6470 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 9 Feb 2022 09:43:57 +0100 Subject: Ignore contact interaction with self No need to insert ourselves as a recent contact Signed-off-by: Thomas Citharel --- .../contactsinteraction/lib/Listeners/ContactInteractionListener.php | 5 +++++ 1 file changed, 5 insertions(+) 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(), -- cgit v1.2.3