Normalize mentions, add tests

This commit is contained in:
Alex Gleason
2022-02-23 22:31:35 -05:00
parent 02f05abeaa
commit 331b239cc9
3 changed files with 29 additions and 6 deletions

View File

@ -8,10 +8,7 @@ const getAccount = makeGetAccount();
const buildMentions = pendingStatus => {
if (pendingStatus.get('in_reply_to_id')) {
return ImmutableList(pendingStatus.get('to') || []).map(acct => ImmutableMap({
acct,
username: acct.split('@')[0],
}));
return ImmutableList(pendingStatus.get('to') || []).map(acct => ImmutableMap({ acct }));
} else {
return ImmutableList();
}