Blocks double likes.

pull/3/head
Vitor Pamplona 2023-01-13 17:28:23 -05:00
rodzic 594795fc16
commit 0001ae441f
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -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)