Mastodon API: Add unsupported attributes to relationship responses
authorMartin Kühl <martin.kuehl@gmail.com>
Wed, 5 Sep 2018 18:13:50 +0000 (20:13 +0200)
committerMartin Kühl <martin.kuehl@gmail.com>
Fri, 7 Sep 2018 14:12:44 +0000 (16:12 +0200)
These attributes are documented as required by the Mastodon API.
Since we don’t support them (I think?), respond with default values.

lib/pleroma/web/mastodon_api/views/account_view.ex
test/web/mastodon_api/account_view_test.exs

index e206e64865c833c17fd9571bbbb79f1bfcebc22a..7915933be9a980ec9776d9469a42e19584b28284 100644 (file)
@@ -75,8 +75,10 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
       followed_by: User.following?(target, user),
       blocking: User.blocks?(user, target),
       muting: false,
+      muting_notifications: false,
       requested: false,
-      domain_blocking: false
+      domain_blocking: false,
+      showing_reblogs: false
     }
   end
 
index 7d0367d01d8acd0e77a84dacf9cf59071fc4e39f..e1e07fbcdcfd10f3828b876e2c83722cb764bd22 100644 (file)
@@ -123,8 +123,10 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
       followed_by: false,
       blocking: true,
       muting: false,
+      muting_notifications: false,
       requested: false,
-      domain_blocking: false
+      domain_blocking: false,
+      showing_reblogs: false
     }
 
     assert expected == AccountView.render("relationship.json", %{user: user, target: other_user})