projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'issue/1934-welcome-email' into 'develop'
[akkoma]
/
lib
/
pleroma
/
web
/
api_spec
/
operations
/
notification_operation.ex
diff --git
a/lib/pleroma/web/api_spec/operations/notification_operation.ex
b/lib/pleroma/web/api_spec/operations/notification_operation.ex
index c6514f3f23e2c7095e5cdcad39f2e5ebf901defb..f09be64cba63db1b83e4f030740d97d3bac19d58 100644
(file)
--- a/
lib/pleroma/web/api_spec/operations/notification_operation.ex
+++ b/
lib/pleroma/web/api_spec/operations/notification_operation.ex
@@
-145,7
+145,7
@@
defmodule Pleroma.Web.ApiSpec.NotificationOperation do
}
end
}
end
- def
p
notification do
+ def notification do
%Schema{
title: "Notification",
description: "Response schema for a notification",
%Schema{
title: "Notification",
description: "Response schema for a notification",
@@
-163,6
+163,13
@@
defmodule Pleroma.Web.ApiSpec.NotificationOperation do
description:
"Status that was the object of the notification, e.g. in mentions, reblogs, favourites, or polls.",
nullable: true
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: %{
}
},
example: %{
@@
-170,7
+177,8
@@
defmodule Pleroma.Web.ApiSpec.NotificationOperation do
"type" => "mention",
"created_at" => "2019-11-23T07:49:02.064Z",
"account" => Account.schema().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
}
}
end
@@
-178,7
+186,16
@@
defmodule Pleroma.Web.ApiSpec.NotificationOperation do
defp notification_type do
%Schema{
type: :string,
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.
description: """
The type of event that resulted in the notification.