feat: Ability to reply to specific tweets (#1117)
Ability to choose a specific tweet to reply to Fixes #982 Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
This commit is contained in:
parent
a6a62d92bf
commit
4216d63311
23 changed files with 290 additions and 38 deletions
|
@ -10,4 +10,26 @@ describe('#MessageFormatter', () => {
|
|||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('tweets', () => {
|
||||
it('should return the same string if not tags or @mentions', () => {
|
||||
const message = 'Chatwoot is an opensource tool';
|
||||
expect(new MessageFormatter(message).formattedMessage).toEqual(message);
|
||||
});
|
||||
|
||||
it('should add links to @mentions', () => {
|
||||
const message =
|
||||
'@chatwootapp is an opensource tool thanks @longnonexistenttwitterusername';
|
||||
expect(new MessageFormatter(message, true).formattedMessage).toEqual(
|
||||
'<a href="http://twitter.com/chatwootapp" target="_blank" rel="noreferrer nofollow noopener">@chatwootapp</a> is an opensource tool thanks @longnonexistenttwitterusername'
|
||||
);
|
||||
});
|
||||
|
||||
it('should add links to #tags', () => {
|
||||
const message = '#chatwootapp is an opensource tool';
|
||||
expect(new MessageFormatter(message, true).formattedMessage).toEqual(
|
||||
'<a href="https://twitter.com/hashtag/chatwootapp" target="_blank" rel="noreferrer nofollow noopener">#chatwootapp</a> is an opensource tool'
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue