Filter statuses by full acct with @ symbol

This commit is contained in:
Alex Gleason 2022-03-26 11:17:27 -05:00
parent 24a78f7740
commit f83119bfc9
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
2 changed files with 5 additions and 7 deletions

View file

@ -143,15 +143,13 @@ Promoting free speech, even for people and ideas you dislike`;
const expected = `DMs are definitely only federated to the servers of the recipients tho. So if I DM a kfcc user, the kfcc admins can see it, but no other instance admins can. const expected = `DMs are definitely only federated to the servers of the recipients tho. So if I DM a kfcc user, the kfcc admins can see it, but no other instance admins can.
@crunklord420@kiwifarms.cc
@becassine@kiwifarms.cc
crunklord420 @King_Porgi@poa.st
becassine @ademan@thebag.social`;
King_Porgi
ademan`;
const result = reducer(undefined, action).getIn(['AHcweewcCh0iPUtMdk', 'search_index']); const result = reducer(undefined, action).getIn(['AHcweewcCh0iPUtMdk', 'search_index']);
expect(result).toEqual(expected); expect(result).toEqual(expected);

View file

@ -60,7 +60,7 @@ const getPollOptionTitles = ({ poll }: StatusRecord): ImmutableList<string> => {
// Gets usernames of mentioned users from status // Gets usernames of mentioned users from status
const getMentionedUsernames = (status: StatusRecord): ImmutableList<string> => { const getMentionedUsernames = (status: StatusRecord): ImmutableList<string> => {
return status.mentions?.map(({ username }: { username: string }) => username); return status.mentions.map(({ acct }) => `@${acct}`);
}; };
// Creates search text from the status // Creates search text from the status