twitter: include intent url in new artist entries (#4028).
This commit is contained in:
@@ -62,10 +62,21 @@ module Sources::Strategies
|
||||
end
|
||||
|
||||
def profile_url
|
||||
return "" if artist_name.blank?
|
||||
return nil if artist_name.blank?
|
||||
"https://twitter.com/#{artist_name}"
|
||||
end
|
||||
|
||||
def intent_url
|
||||
return nil if api_response.blank?
|
||||
|
||||
user_id = api_response.attrs[:user][:id_str]
|
||||
"https://twitter.com/intent/user?user_id=#{user_id}"
|
||||
end
|
||||
|
||||
def profile_urls
|
||||
[profile_url, intent_url].compact
|
||||
end
|
||||
|
||||
def artist_name
|
||||
if artist_name_from_url.present?
|
||||
artist_name_from_url
|
||||
|
||||
Reference in New Issue
Block a user