chore: improve notification (#48)

Reviewed-on: #48
This commit was merged in pull request #48.
This commit is contained in:
2026-07-20 07:02:00 +00:00
parent 07085449a4
commit 4a8134dec0
2 changed files with 14 additions and 4 deletions

View File

@@ -154,7 +154,10 @@ class Nostr(
// Trigger new message notification
if (rumor != null) {
if (rumor.createdAt().asSecs() >= now.asSecs()) {
val isSelfMessage = rumor.author() == signer.publicKeyFlow.value
val isNew = rumor.createdAt().asSecs() >= now.asSecs()
if (isNew && !isSelfMessage) {
onNewMessage(rumor)
}
}