When looking up fediverse urls, verify that account results returned match the input query. (#3341)
Fixes #2804
This commit is contained in:
parent
fda8c80949
commit
2e189a17dc
2 changed files with 16 additions and 3 deletions
|
|
@ -86,8 +86,11 @@ abstract class BottomSheetActivity : BaseActivity() {
|
|||
if (statuses.isNotEmpty()) {
|
||||
viewThread(statuses[0].id, statuses[0].url)
|
||||
return@subscribe
|
||||
} else if (accounts.isNotEmpty()) {
|
||||
viewAccount(accounts[0].id)
|
||||
}
|
||||
accounts.firstOrNull { it.url == url }?.let { account ->
|
||||
// Some servers return (unrelated) accounts for url searches (#2804)
|
||||
// Verify that the account's url matches the query
|
||||
viewAccount(account.id)
|
||||
return@subscribe
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue