Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
c2b69798
Commit
c2b69798
authored
Sep 22, 2018
by
kaniini
Browse files
twitter api: add support for disabling rich text
parent
958e085a
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/web/twitter_api/twitter_api_controller.ex
View file @
c2b69798
...
...
@@ -443,6 +443,20 @@ def update_profile(%{assigns: %{user: user}} = conn, params) do
user
end
user
=
if
no_rich_text
=
params
[
"no_rich_text"
]
do
with
no_rich_text
<-
no_rich_text
==
"true"
,
new_info
<-
Map
.
put
(
user
.
info
,
"no_rich_text"
,
no_rich_text
),
change
<-
User
.
info_changeset
(
user
,
%{
info:
new_info
}),
{
:ok
,
user
}
<-
User
.
update_and_set_cache
(
change
)
do
user
else
_e
->
user
end
else
user
end
user
=
if
default_scope
=
params
[
"default_scope"
]
do
with
new_info
<-
Map
.
put
(
user
.
info
,
"default_scope"
,
default_scope
),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment