Blocks double likes.

This commit is contained in:
Vitor Pamplona 2023-01-13 17:28:23 -05:00
parent 594795fc16
commit 0001ae441f

View File

@ -22,6 +22,11 @@ class Account(val loggedIn: Persona) {
fun reactTo(note: Note) {
if (!isWriteable()) return
if (note.reactions.firstOrNull { it.author == userProfile() } != null) {
// has already liked this note
return
}
note.event?.let {
val event = ReactionEvent.create(it, loggedIn.privKey!!)
Client.send(event)