Skip to content

Commit

Permalink
[FIX] Incorrect error message when opening channel in anonymous read (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
lucassartor authored May 20, 2021
1 parent 40af8b0 commit 772d412
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
4 changes: 0 additions & 4 deletions app/lib/server/methods/getMessages.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ Meteor.methods({
getMessages(messages) {
check(messages, [String]);

if (!Meteor.userId()) {
throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'getSingleMessage' });
}

const cache = {};

return messages.map((msgId) => {
Expand Down
6 changes: 0 additions & 6 deletions server/methods/loadMissedMessages.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ Meteor.methods({
check(rid, String);
check(start, Date);

if (!Meteor.userId()) {
throw new Meteor.Error('error-invalid-user', 'Invalid user', {
method: 'loadMissedMessages',
});
}

const fromId = Meteor.userId();
if (!Meteor.call('canAccessRoom', rid, fromId)) {
return false;
Expand Down

0 comments on commit 772d412

Please sign in to comment.