AccountView: Add 'accepts_chat_messages' to view.
authorlain <lain@soykaf.club>
Fri, 3 Jul 2020 11:07:33 +0000 (13:07 +0200)
committerlain <lain@soykaf.club>
Fri, 3 Jul 2020 11:07:33 +0000 (13:07 +0200)
lib/pleroma/web/mastodon_api/views/account_view.ex
test/web/mastodon_api/views/account_view_test.exs

index a6e64b4ab77b620f1b97fd07aae00a0a6c815e67..6a643bfcc7b74e2e792f18ccc46538b7e0dcf0aa 100644 (file)
@@ -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])
index 80b1f734c041da92081c3f120fac8ab0911a5ef3..3234a26a2510f097431516500008f4b2c59f4ff6 100644 (file)
@@ -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
       }
     }