0
0
Fork 0

Add API modifiers to limit returned toots from public/hashtag timelines

to only those from local users; Add link to "extended information" to
getting started in the UI; Add defaults for posting privacy; Change
how publish button looks depending on posting privacy chosen
This commit is contained in:
Eugen Rochko 2017-02-06 23:16:20 +01:00
parent 4d2be9f432
commit 347a153b3d
15 changed files with 55 additions and 34 deletions

View file

@ -21,7 +21,9 @@ class Settings::PreferencesController < ApplicationController
must_be_following: user_params[:interactions][:must_be_following] == '1',
}
if current_user.update(user_params.except(:notification_emails, :interactions))
current_user.settings['default_privacy'] = user_params[:settings][:default_privacy]
if current_user.update(user_params.except(:notification_emails, :interactions, :settings))
redirect_to settings_preferences_path, notice: I18n.t('generic.changes_saved_msg')
else
render action: :show
@ -31,6 +33,6 @@ class Settings::PreferencesController < ApplicationController
private
def user_params
params.require(:user).permit(:locale, notification_emails: [:follow, :follow_request, :reblog, :favourite, :mention], interactions: [:must_be_follower, :must_be_following])
params.require(:user).permit(:locale, settings: [:default_privacy], notification_emails: [:follow, :follow_request, :reblog, :favourite, :mention], interactions: [:must_be_follower, :must_be_following])
end
end