Skip to content

Commit

Permalink
type fix
Browse files Browse the repository at this point in the history
  • Loading branch information
c0dzilla committed Jun 12, 2018
1 parent ebf8b09 commit 2053ec1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/rocketchat-lib/server/methods/sendMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Meteor.methods({
}

if (message.msg) {
const adjustedMessage = RocketChat.messageProperties.messageWithoutEmojiShortnames(message);
const adjustedMessage = RocketChat.messageProperties.messageWithoutEmojiShortnames(message.msg);

if (RocketChat.messageProperties.length(adjustedMessage) > RocketChat.settings.get('Message_MaxAllowedSize')) {
throw new Meteor.Error('error-message-size-exceeded', 'Message size exceeds Message_MaxAllowedSize', {
Expand Down
2 changes: 1 addition & 1 deletion packages/rocketchat-lib/tests/server.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ describe('Message Properties', () => {
describe('Check Message Length', () => {
Object.keys(messages).forEach((objectKey) => {
it('should treat emojis as single characters', () => {
assert.equal(messageProperties(objectKey).length, messages[objectKey]);
assert.equal(messageProperties.length(objectKey), messages[objectKey]);
});
});
});
Expand Down

0 comments on commit 2053ec1

Please sign in to comment.