X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fnotification%2FNewRemotePostHandler.kt;fp=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fnotification%2FNewRemotePostHandler.kt;h=1127feafb82e6ef0ecbeb3119388787fecc02e92;hb=b9320b57631d90d344edeb2a86c61db00ac50911;hp=acf998028162b8e5fba8c74802360730a8c501cc;hpb=eb828bec5212bba8b9745f45defdc47711968ce6;p=Sone.git diff --git a/src/main/kotlin/net/pterodactylus/sone/web/notification/NewRemotePostHandler.kt b/src/main/kotlin/net/pterodactylus/sone/web/notification/NewRemotePostHandler.kt index acf9980..1127fea 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/notification/NewRemotePostHandler.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/notification/NewRemotePostHandler.kt @@ -31,9 +31,11 @@ class NewRemotePostHandler(private val notificationManager: NotificationManager, @Subscribe fun newPostFound(newPostFoundEvent: NewPostFoundEvent) { - notification.add(newPostFoundEvent.post) - if (!notificationManager.hasFirstStartNotification()) { - notificationManager.addNotification(notification) + if (!newPostFoundEvent.post.sone.isLocal) { + notification.add(newPostFoundEvent.post) + if (!notificationManager.hasFirstStartNotification()) { + notificationManager.addNotification(notification) + } } }