From: William Pitcock Date: Sat, 22 Sep 2018 03:20:25 +0000 (+0000) Subject: twitter api: add no_rich_text option to userview for account prefs X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=56577d8b48fcb8046bf559e683f11045b3e98f51;p=akkoma twitter api: add no_rich_text option to userview for account prefs --- diff --git a/lib/pleroma/web/twitter_api/views/user_view.ex b/lib/pleroma/web/twitter_api/views/user_view.ex index cec9e11a0..cfbaef4c9 100644 --- a/lib/pleroma/web/twitter_api/views/user_view.ex +++ b/lib/pleroma/web/twitter_api/views/user_view.ex @@ -64,7 +64,8 @@ defmodule Pleroma.Web.TwitterAPI.UserView do "background_image" => image_url(user.info["background"]) |> MediaProxy.url(), "is_local" => user.local, "locked" => !!user.info["locked"], - "default_scope" => user.info["default_scope"] || "public" + "default_scope" => user.info["default_scope"] || "public", + "no_rich_text" => user.info["no_rich_text"] || false } if assigns[:token] do diff --git a/test/web/twitter_api/views/user_view_test.exs b/test/web/twitter_api/views/user_view_test.exs index 7075a2370..50687f450 100644 --- a/test/web/twitter_api/views/user_view_test.exs +++ b/test/web/twitter_api/views/user_view_test.exs @@ -87,7 +87,8 @@ defmodule Pleroma.Web.TwitterAPI.UserViewTest do "background_image" => nil, "is_local" => true, "locked" => false, - "default_scope" => "public" + "default_scope" => "public", + "no_rich_text" => false } assert represented == UserView.render("show.json", %{user: user}) @@ -126,7 +127,8 @@ defmodule Pleroma.Web.TwitterAPI.UserViewTest do "background_image" => nil, "is_local" => true, "locked" => false, - "default_scope" => "public" + "default_scope" => "public", + "no_rich_text" => false } assert represented == UserView.render("show.json", %{user: user, for: follower}) @@ -166,7 +168,8 @@ defmodule Pleroma.Web.TwitterAPI.UserViewTest do "background_image" => nil, "is_local" => true, "locked" => false, - "default_scope" => "public" + "default_scope" => "public", + "no_rich_text" => false } assert represented == UserView.render("show.json", %{user: follower, for: user}) @@ -213,7 +216,8 @@ defmodule Pleroma.Web.TwitterAPI.UserViewTest do "background_image" => nil, "is_local" => true, "locked" => false, - "default_scope" => "public" + "default_scope" => "public", + "no_rich_text" => false } blocker = Repo.get(User, blocker.id)