diff options
author | lain <lain@soykaf.club> | 2020-05-15 13:18:41 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-05-15 13:18:41 +0200 |
commit | 1d18721a3c60aa0acc7d1ba858a92277e544a54a (patch) | |
tree | 6e7790ec51a3385777c97dfa691ced32928b4fbe | |
parent | 3342846ac2bbd48e985cfeff26ba4593f4815879 (diff) | |
download | pleroma-1d18721a3c60aa0acc7d1ba858a92277e544a54a.tar.gz |
Chats: Add updated_at to Schema and docs.
-rw-r--r-- | docs/API/chats.md | 9 | ||||
-rw-r--r-- | lib/pleroma/web/api_spec/schemas/chat.ex | 6 |
2 files changed, 10 insertions, 5 deletions
diff --git a/docs/API/chats.md b/docs/API/chats.md index 1ea18ff5f..2e415e4da 100644 --- a/docs/API/chats.md +++ b/docs/API/chats.md @@ -68,7 +68,8 @@ Returned data: }, "id" : "1", "unread" : 2, - "last_message" : {...} // The last message in that chat + "last_message" : {...}, // The last message in that chat + "updated_at": "2020-04-21T15:11:46.000Z" } ``` @@ -88,7 +89,8 @@ Returned data: ... }, "id" : "1", - "unread" : 0 + "unread" : 0, + "updated_at": "2020-04-21T15:11:46.000Z" } ``` @@ -112,7 +114,8 @@ Returned data: }, "id" : "1", "unread" : 2, - "last_message" : {...} // The last message in that chat + "last_message" : {...}, // The last message in that chat + "updated_at": "2020-04-21T15:11:46.000Z" } ] ``` diff --git a/lib/pleroma/web/api_spec/schemas/chat.ex b/lib/pleroma/web/api_spec/schemas/chat.ex index c6ec07c88..b4986b734 100644 --- a/lib/pleroma/web/api_spec/schemas/chat.ex +++ b/lib/pleroma/web/api_spec/schemas/chat.ex @@ -16,7 +16,8 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Chat do id: %Schema{type: :string}, account: %Schema{type: :object}, unread: %Schema{type: :integer}, - last_message: ChatMessage + last_message: ChatMessage, + updated_at: %Schema{type: :string, format: :"date-time"} }, example: %{ "account" => %{ @@ -67,7 +68,8 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Chat do }, "id" => "1", "unread" => 2, - "last_message" => ChatMessage.schema().example() + "last_message" => ChatMessage.schema().example(), + "updated_at" => "2020-04-21T15:06:45.000Z" } }) end |