Add avatar_description and header_description parameters to PATCH /api/v1/profile (#38221)

This commit is contained in:
Claire
2026-03-16 15:04:25 +01:00
committed by GitHub
parent 8124f1581a
commit b7246518bf
3 changed files with 5 additions and 1 deletions

View File

@@ -25,7 +25,9 @@ class Api::V1::ProfilesController < Api::BaseController
:display_name, :display_name,
:note, :note,
:avatar, :avatar,
:avatar_description,
:header, :header,
:header_description,
:locked, :locked,
:bot, :bot,
:discoverable, :discoverable,

View File

@@ -45,7 +45,7 @@ module Mastodon
def api_versions def api_versions
{ {
mastodon: 8, mastodon: 9,
} }
end end

View File

@@ -62,6 +62,7 @@ RSpec.describe 'Profile API' do
let(:params) do let(:params) do
{ {
avatar: fixture_file_upload('avatar.gif', 'image/gif'), avatar: fixture_file_upload('avatar.gif', 'image/gif'),
avatar_description: 'animated walking round cat',
discoverable: true, discoverable: true,
display_name: "Alice Isn't Dead", display_name: "Alice Isn't Dead",
header: fixture_file_upload('attachment.jpg', 'image/jpeg'), header: fixture_file_upload('attachment.jpg', 'image/jpeg'),
@@ -110,6 +111,7 @@ RSpec.describe 'Profile API' do
display_name: eq("Alice Isn't Dead"), display_name: eq("Alice Isn't Dead"),
note: 'Hello!', note: 'Hello!',
avatar: exist, avatar: exist,
avatar_description: 'animated walking round cat',
header: exist, header: exist,
attribution_domains: ['example.com'], attribution_domains: ['example.com'],
fields: contain_exactly( fields: contain_exactly(