Skip to content

Commit

Permalink
compose: In content-input placeholder, remove @ for 1:1 DMs, to match…
Browse files Browse the repository at this point in the history
… web

In web, the compose box for 1:1 DMs has a placeholder like "Message
Tim Abbott", not "Message @tim Abbott". Update mobile to match.
  • Loading branch information
chrisbobbe committed Jan 4, 2024
1 parent b5e8c42 commit ecfd8d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/compose/__tests__/getComposeInputPlaceholder-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ describe('getComposeInputPlaceholder', () => {
const ownUserId = eg.selfUser.user_id;
const streamsById = getStreamsById(eg.plusReduxState);

test('returns "Message @ThisPerson" object for person narrow', () => {
test('returns "Message This Person" object for person narrow', () => {
const narrow = deepFreeze(pm1to1NarrowFromUser(eg.otherUser));
const placeholder = getComposeInputPlaceholder(narrow, ownUserId, usersById, streamsById);
expect(placeholder).toEqual({
text: 'Message {recipient}',
values: { recipient: `@${eg.otherUser.full_name}` },
values: { recipient: eg.otherUser.full_name },
});
});

Expand Down
2 changes: 1 addition & 1 deletion src/compose/getComposeInputPlaceholder.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default (

return {
text: 'Message {recipient}',
values: { recipient: `@${user.full_name}` },
values: { recipient: user.full_name },
};
},
stream: streamId => {
Expand Down

0 comments on commit ecfd8d4

Please sign in to comment.