mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-22 01:05:34 +03:00
Better username lookup
This commit is contained in:
parent
d4cdf2435f
commit
5c6fb7b7c8
1 changed files with 7 additions and 2 deletions
|
@ -695,9 +695,14 @@ function Status({
|
|||
) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
const username = target.querySelector('span');
|
||||
const username = (
|
||||
target.querySelector('span') || target
|
||||
).innerText
|
||||
.trim()
|
||||
.replace(/^@/, '');
|
||||
const mention = mentions.find(
|
||||
(mention) => mention.username === username?.innerText.trim(),
|
||||
(mention) =>
|
||||
mention.username === username || mention.acct === username,
|
||||
);
|
||||
if (mention) {
|
||||
states.showAccount = mention.acct;
|
||||
|
|
Loading…
Reference in a new issue