From 6702ff38a79b098c2963c983bca42079451b662c Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 9 Feb 2022 09:43:57 +0100 Subject: [PATCH] Ignore contact interaction with self No need to insert ourselves as a recent contact Signed-off-by: Thomas Citharel --- .../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 21991007ee70a..333a639392067 100644 --- a/apps/contactsinteraction/lib/Listeners/ContactInteractionListener.php +++ b/apps/contactsinteraction/lib/Listeners/ContactInteractionListener.php @@ -84,6 +84,11 @@ public function handle(Event $event): void { 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(),