}
end
- defp notification do
+ def notification do
%Schema{
title: "Notification",
description: "Response schema for a notification",
description:
"Status that was the object of the notification, e.g. in mentions, reblogs, favourites, or polls.",
nullable: true
+ },
+ pleroma: %Schema{
+ type: :object,
+ properties: %{
+ is_seen: %Schema{type: :boolean},
+ is_muted: %Schema{type: :boolean}
+ }
}
},
example: %{
"type" => "mention",
"created_at" => "2019-11-23T07:49:02.064Z",
"account" => Account.schema().example,
- "status" => Status.schema().example
+ "status" => Status.schema().example,
+ "pleroma" => %{"is_seen" => false, "is_muted" => false}
}
}
end
defp notification_type do
%Schema{
type: :string,
- enum: ["follow", "favourite", "reblog", "mention", "poll", "pleroma:emoji_reaction", "move"],
+ enum: [
+ "follow",
+ "favourite",
+ "reblog",
+ "mention",
+ "pleroma:emoji_reaction",
+ "pleroma:chat_mention",
+ "move",
+ "follow_request"
+ ],
description: """
The type of event that resulted in the notification.