Disallow Twitter Feed Provider ability if the feed names explicitly don't match

This commit is contained in:
Maurice Parker 2020-04-22 11:41:40 -05:00
parent 8371517c8d
commit 7b37f51f59
1 changed files with 9 additions and 2 deletions

View File

@ -93,8 +93,15 @@ public struct TwitterFeedProvider: FeedProvider {
return .none
}
let bestUserName = username != nil ? username : urlComponents.user
if bestUserName == screenName {
if let username = username {
if username == screenName {
return .owner
} else {
return .none
}
}
if let user = urlComponents.user, user == screenName {
return .owner
}