PLT-7474 Stopped requiring confirmation for mentions in code blocks (#7375)
* PLT-7474 Stopped requiring confirmation for mentions in code blocks * Stopped mentioning people from code blocks using ~~~
Этот коммит содержится в:
коммит произвёл
Saturnino Abril
родитель
daed8ffbf6
Коммит
575864c917
@@ -4,8 +4,8 @@ describe('PostUtils.containsAtMention', function() {
|
||||
test('should return correct @all (same for @channel)', function() {
|
||||
for (const data of [
|
||||
{
|
||||
text: undefined, //eslint-disable-line no-undefined
|
||||
key: undefined, //eslint-disable-line no-undefined
|
||||
text: undefined, // eslint-disable-line no-undefined
|
||||
key: undefined, // eslint-disable-line no-undefined
|
||||
result: false
|
||||
},
|
||||
{
|
||||
@@ -87,6 +87,56 @@ describe('PostUtils.containsAtMention', function() {
|
||||
text: 'hey @ALL:+1:',
|
||||
key: '@all',
|
||||
result: true
|
||||
},
|
||||
{
|
||||
text: '`@all`',
|
||||
key: '@all',
|
||||
result: false
|
||||
},
|
||||
{
|
||||
text: '@someone `@all`',
|
||||
key: '@all',
|
||||
result: false
|
||||
},
|
||||
{
|
||||
text: '@someone `@all`',
|
||||
key: '@someone',
|
||||
result: true
|
||||
},
|
||||
{
|
||||
text: '``@all``',
|
||||
key: '@all',
|
||||
result: false
|
||||
},
|
||||
{
|
||||
text: '```@all```',
|
||||
key: '@all',
|
||||
result: false
|
||||
},
|
||||
{
|
||||
text: '```\n@all\n```',
|
||||
key: '@all',
|
||||
result: false
|
||||
},
|
||||
{
|
||||
text: '```````\n@all\n```````',
|
||||
key: '@all',
|
||||
result: false
|
||||
},
|
||||
{
|
||||
text: '```code\n@all\n```',
|
||||
key: '@all',
|
||||
result: false
|
||||
},
|
||||
{
|
||||
text: '~~~@all~~~',
|
||||
key: '@all',
|
||||
result: true
|
||||
},
|
||||
{
|
||||
text: '~~~\n@all\n~~~',
|
||||
key: '@all',
|
||||
result: false
|
||||
}
|
||||
]) {
|
||||
const containsAtMention = PostUtils.containsAtMention(data.text, data.key);
|
||||
|
||||
Ссылка в новой задаче
Block a user