mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-23 14:35:41 +00:00
b7370ac8ba
* Deliver ActivityPub Like * Deliver ActivityPub Undo-Like * Deliver ActivityPub Create/Announce activities * Deliver ActivityPub creates from mentions * Deliver ActivityPub Block/Undo-Block * Deliver ActivityPub Accept/Reject-Follow * Deliver ActivityPub Undo-Follow * Deliver ActivityPub Follow * Deliver ActivityPub Delete activities Incidentally fix #889 * Adjust BatchedRemoveStatusService for ActivityPub * Add tests for ActivityPub workers * Add tests for FollowService * Add tests for FavouriteService, UnfollowService and PostStatusService * Add tests for ReblogService, BlockService, UnblockService, ProcessMentionsService * Add tests for AuthorizeFollowService, RejectFollowService, RemoveStatusService * Add tests for BatchedRemoveStatusService * Deliver updates to a local account to ActivityPub followers * Minor adjustments
35 lines
742 B
Ruby
35 lines
742 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Settings::ProfilesController < ApplicationController
|
|
include ObfuscateFilename
|
|
|
|
layout 'admin'
|
|
|
|
before_action :authenticate_user!
|
|
before_action :set_account
|
|
|
|
obfuscate_filename [:account, :avatar]
|
|
obfuscate_filename [:account, :header]
|
|
|
|
def show; end
|
|
|
|
def update
|
|
if @account.update(account_params)
|
|
ActivityPub::UpdateDistributionWorker.perform_async(@account.id)
|
|
redirect_to settings_profile_path, notice: I18n.t('generic.changes_saved_msg')
|
|
else
|
|
render :show
|
|
end
|
|
end
|
|
|
|
private
|
|
|
|
def account_params
|
|
params.require(:account).permit(:display_name, :note, :avatar, :header, :locked)
|
|
end
|
|
|
|
def set_account
|
|
@account = current_user.account
|
|
end
|
|
end
|