aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-07-03 13:07:33 +0200
committerlain <lain@soykaf.club>2020-07-03 13:07:33 +0200
commit3250228be9719b0afa24c97b64f56d2275c4fe67 (patch)
tree33ea7f457e06febd5b774b58f1121c47c812dee4
parent98bfdba108d4213eea82dc4d63edb8bb834118fb (diff)
downloadpleroma-3250228be9719b0afa24c97b64f56d2275c4fe67.tar.gz
AccountView: Add 'accepts_chat_messages' to view.
-rw-r--r--lib/pleroma/web/mastodon_api/views/account_view.ex3
-rw-r--r--test/web/mastodon_api/views/account_view_test.exs6
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/account_view.ex b/lib/pleroma/web/mastodon_api/views/account_view.ex
index a6e64b4ab..6a643bfcc 100644
--- a/lib/pleroma/web/mastodon_api/views/account_view.ex
+++ b/lib/pleroma/web/mastodon_api/views/account_view.ex
@@ -245,7 +245,8 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
hide_favorites: user.hide_favorites,
relationship: relationship,
skip_thread_containment: user.skip_thread_containment,
- background_image: image_url(user.background) |> MediaProxy.url()
+ background_image: image_url(user.background) |> MediaProxy.url(),
+ accepts_chat_messages: user.accepts_chat_messages
}
}
|> maybe_put_role(user, opts[:for])
diff --git a/test/web/mastodon_api/views/account_view_test.exs b/test/web/mastodon_api/views/account_view_test.exs
index 80b1f734c..3234a26a2 100644
--- a/test/web/mastodon_api/views/account_view_test.exs
+++ b/test/web/mastodon_api/views/account_view_test.exs
@@ -85,7 +85,8 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
hide_followers_count: false,
hide_follows_count: false,
relationship: %{},
- skip_thread_containment: false
+ skip_thread_containment: false,
+ accepts_chat_messages: false
}
}
@@ -162,7 +163,8 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
hide_followers_count: false,
hide_follows_count: false,
relationship: %{},
- skip_thread_containment: false
+ skip_thread_containment: false,
+ accepts_chat_messages: false
}
}