Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriellsh committed Oct 7, 2024
1 parent 29672de commit 9888016
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/meteor/app/lib/server/methods/sendMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Meteor.methods<ServerMethods>({
try {
return await applyAirGappedRestrictionsValidation(() => executeSendMessage(uid, message, previewUrls));
} catch (error: any) {
if ((error.error || error.message) === 'error-not-allowed' || (error.error || error.message) === 'restricted-workspace') {
if (['error-not-allowed', 'restricted-workspace'].includes(error.error || error.message)) {
throw new Meteor.Error(error.error || error.message, error.reason, {
method: 'sendMessage',
});
Expand Down

0 comments on commit 9888016

Please sign in to comment.