Correctly addresses a report to a note (and not to a user)

This commit is contained in:
Vitor Pamplona 2023-02-05 18:10:32 -05:00
parent f1a37afaf1
commit eb41f22bae

View File

@ -162,6 +162,7 @@ object LocalCache {
event.content,
object : TypeToken<Map<String, ContactListEvent.ReadWrite>>() {}.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)