[FIX] Incorrect error message when opening channel in anonymous read (#22066)

pull/22044/head^2
Lucas Sartor Chauvin 5 years ago committed by GitHub
parent 40af8b0f6e
commit 772d412e84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/lib/server/methods/getMessages.js
  2. 6
      server/methods/loadMissedMessages.js

@ -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) => {

@ -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;

Loading…
Cancel
Save