parent
87f116bab7
commit
22671a9e18
@ -1,8 +1,30 @@ |
||||
import { Meteor } from 'meteor/meteor'; |
||||
import { EmojiCustom } from '@rocket.chat/models'; |
||||
import { check, Match } from 'meteor/check'; |
||||
|
||||
import { methodDeprecationLogger } from '../../../lib/server/lib/deprecationWarningLogger'; |
||||
|
||||
/** |
||||
* @deprecated Will be removed in future versions. |
||||
*/ |
||||
|
||||
Meteor.methods({ |
||||
async listEmojiCustom(options = {}) { |
||||
methodDeprecationLogger.warn('listEmojiCustom will be removed in future versions of Rocket.Chat'); |
||||
|
||||
const user = Meteor.user(); |
||||
|
||||
if (!user) { |
||||
throw new Meteor.Error('error-invalid-user', 'Invalid user', { |
||||
method: 'listEmojiCustom', |
||||
}); |
||||
} |
||||
|
||||
check(options, { |
||||
name: Match.Optional(String), |
||||
aliases: Match.Optional([String]), |
||||
}); |
||||
|
||||
return EmojiCustom.find(options).toArray(); |
||||
}, |
||||
}); |
||||
|
||||
@ -1,3 +1,3 @@ |
||||
{ |
||||
"version": "5.4.2" |
||||
"version": "5.4.3" |
||||
} |
||||
|
||||
@ -0,0 +1,5 @@ |
||||
// default email engines - like gmail - will render texts with dots as an anchor tag.
|
||||
// If we can, we should avoid that.
|
||||
export const safeHtmlDots = (text: string): string => { |
||||
return text.replace(/\./g, '․'); |
||||
} |
||||
Loading…
Reference in new issue