cover edited mentions

This commit is contained in:
2458773093 2019-08-28 17:27:33 +03:00
parent 5f352c4771
commit fda449bf27

View File

@ -194,7 +194,10 @@ const expandMentions = status => {
const fragment = domParser.parseFromString(status.get('content'), 'text/html').documentElement;
status.get('mentions').forEach(mention => {
const mentionFragment = fragment.querySelector(`a[href$="/${mention.get('acct')}"]`);
if (mentionFragment) {
fragment.querySelector(`a[href$="/${mention.get('acct')}"]`).textContent = `@${mention.get('acct')}`;
}
});
return fragment.innerHTML;