From eb41f22baef60bfdc6eb2636987a6f66af5a6222 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Sun, 5 Feb 2023 18:10:32 -0500 Subject: [PATCH] Correctly addresses a report to a note (and not to a user) --- .../java/com/vitorpamplona/amethyst/model/LocalCache.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/model/LocalCache.kt b/app/src/main/java/com/vitorpamplona/amethyst/model/LocalCache.kt index cd45087dc..3a42320a8 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/model/LocalCache.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/model/LocalCache.kt @@ -162,6 +162,7 @@ object LocalCache { event.content, object : TypeToken>() {}.type ) + user.updateRelays(relays) } } catch (e: Exception) { @@ -292,8 +293,10 @@ object LocalCache { //Log.d("RP", "New Report ${event.content} by ${note.author?.toBestDisplayName()} ${formattedDateTime(event.createdAt)}") // Adds notifications to users. - mentions.forEach { - it.addReport(note) + if (repliesTo.isEmpty()) { + mentions.forEach { + it.addReport(note) + } } repliesTo.forEach { it.addReport(note)