mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-21 18:08:25 +00:00
@ -53,7 +53,12 @@ object Channel {
|
||||
deriveConfiguredEncoder[Mail]
|
||||
}
|
||||
|
||||
final case class Gotify(id: Ident, url: LenientUri, appKey: Password) extends Channel {
|
||||
final case class Gotify(
|
||||
id: Ident,
|
||||
url: LenientUri,
|
||||
appKey: Password,
|
||||
priority: Option[Int]
|
||||
) extends Channel {
|
||||
val channelType = ChannelType.Gotify
|
||||
def fold[A](
|
||||
f1: Mail => A,
|
||||
|
@ -30,7 +30,8 @@ object NotificationChannel {
|
||||
headers: Map[String, String]
|
||||
) extends NotificationChannel
|
||||
|
||||
final case class Gotify(url: LenientUri, appKey: Password) extends NotificationChannel
|
||||
final case class Gotify(url: LenientUri, appKey: Password, priority: Option[Int])
|
||||
extends NotificationChannel
|
||||
|
||||
final case class Matrix(
|
||||
homeServer: LenientUri,
|
||||
|
@ -35,6 +35,7 @@ final class GotifyBackend[F[_]: Async](
|
||||
val req = POST(
|
||||
Json.obj(
|
||||
"title" -> Json.fromString(title),
|
||||
"priority" -> Json.fromInt(channel.priority.getOrElse(0)),
|
||||
"message" -> Json.fromString(body),
|
||||
"extras" -> Json.obj(
|
||||
"client::display" -> Json.obj(
|
||||
|
Reference in New Issue
Block a user