Sources: get correct mastodon page url

This commit is contained in:
nonamethanks
2021-02-26 19:45:01 +01:00
parent cf62e13394
commit ba826ff6fa
2 changed files with 6 additions and 2 deletions

View File

@@ -85,7 +85,7 @@ module Sources::Strategies
end
def artist_name_from_url
url[NAMED_PROFILE, :artist_name]
urls.map { |url| url[NAMED_PROFILE, :artist_name] }.compact.first
end
def other_names
@@ -93,7 +93,7 @@ module Sources::Strategies
end
def account_id
url[ID_PROFILE, :account_id] || api_response.account_id
urls.map { |url| url[ID_PROFILE, :account_id] }.compact.first || api_response.account_id
end
def status_id_from_url

View File

@@ -95,6 +95,10 @@ module Sources
should "fetch the source data" do
assert_equal("evazion", @site.artist_name)
end
should "correctly get the page url" do
assert_equal(@ref, @site.page_url)
end
end
context "A baraag url" do