-
Notifications
You must be signed in to change notification settings - Fork 10.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SlackBridge images aren't coming across #5791
Comments
Are others experiencing this issue as well? Could it be a server issue? |
yes seeing the same issue. Weird thing is that it also seems to add all slack users from my company to the general list, even though my bot is only tied to one channel with a handful of users. Separate issue I suppose. |
Yes same issue
|
We're getting |
@rodrigok and @sampaiodiego any ideas? |
I am getting the same issue. Images won't go through RC to Slack or Slack to RC. No error showing on RC to Slack but on Slack to RC I get:
|
Hi I'm investigate this issue and found that in FileUploadBase.js line 6 it's return undefined that cause Forbidden error from jalik-ufs when it try to check permission before insert data (ufs-store.js line 339) I'm don't know why userId in FileUploadBase.js is undefined but below is just quick fix this issue not sure is it a good way or not or should I use the same way to check permission as it shown in update and remove functions ? UploadFS.config.defaultStorePermissions = new UploadFS.StorePermissions({
insert(userId/*, doc*/) {
if (userId) {
return userId;
}
return true;
},
update(userId, doc) {
return RocketChat.authz.hasPermission(Meteor.userId(), 'delete-message', doc.rid) || (RocketChat.settings.get('Message_AllowDeleting') && userId === doc.userId);
},
remove(userId, doc) {
return RocketChat.authz.hasPermission(Meteor.userId(), 'delete-message', doc.rid) || (RocketChat.settings.get('Message_AllowDeleting') && userId === doc.userId);
}
}); |
💗💙💚💛💜 |
Rocket.Chat Version: Official docker image 0.50.1
Running Instances: 1
DB Replicaset OpLog: mongodb://mongo:27017/local
Node Version: whatever is included in official docker image
SlackBridge images aren't coming across again.
Messages to/from rc/slack are working as expected.
No error in log when sending image from RC, log from sending image from slack to RC below.
[34mI20170126-05:54:31.024(0) �[34mSlackBridge ➔ Events.debug OnSlackEvent-MESSAGE: { type: 'message', subtype: 'file_share', text: '<@redacted|mrplowdan> uploaded a file: <https://redacted.slack.com/files/mrplowdan/redacted/logo.png|logo.png>', file: { id: 'redacted', created: 1485410069, timestamp: 1485410069, name: 'logo.png', title: 'logo.png', mimetype: 'image/png', filetype: 'png', pretty_type: 'PNG', user: 'redacted', editable: false, size: 30727, mode: 'hosted', is_external: false, external_type: '', is_public: true, public_url_shared: false, display_as_bot: false, username: '', url_private: 'https://files.slack.com/files-pri/redacted-redacted/logo.png', url_private_download: 'https://files.slack.com/files-pri/redacted-redacted/download/logo.png', thumb_64: 'https://files.slack.com/files-tmb/redacted-redacted-redacted/logo_64.png', thumb_80: 'https://files.slack.com/files-tmb/redacted-redacted-redacted/logo_80.png', thumb_360: 'https://files.slack.com/files-tmb/redacted-redacted-redacted/logo_360.png', thumb_360_w: 246, thumb_360_h: 246, thumb_160: 'https://files.slack.com/files-tmb/redacted-redacted-redacted/logo_160.png', image_exif_rotation: 1, original_w: 246, original_h: 246, permalink: 'https://redacted.slack.com/files/mrplowdan/redacted/logo.png', permalink_public: 'https://slack-files.com/redacted-redacted-redacted', channels: [ 'redacted' ], groups: [], ims: [], comments_count: 0 }, user: 'redacted', upload: true, display_as_bot: false, username: '<@redacted|mrplowdan>', bot_id: null, team: 'redacted', source_team: 'redacted', user_team: 'redacted', user_profile: { avatar_hash: '678126fd7289', image_72: 'https://avatars.slack-edge.com/2016-12-12/redacted_72.jpg', first_name: 'Dan', real_name: 'Dan', name: 'mrplowdan' }, channel: 'redacted', ts: '1485410070.000113' } �[34mI20170126-05:54:31.933(0) Exception in callback of async function: Error: Forbidden [forbidden] at Object.<anonymous> (/app/bundle/programs/server/packages/jalik_ufs.js:1066:27) at packages/matb33_collection-hooks.js:352:26 at Array.forEach (native) at Function._.each._.forEach (packages/underscore.js:139:11) at Object.<anonymous> (packages/matb33_collection-hooks.js:351:9) at Object.collection.(anonymous function) [as insert] (packages/matb33_collection-hooks.js:146:21) at [object Object].insert (/app/bundle/programs/server/packages/mongo.js:3944:38) at ModelsBaseDb.insert (/app/bundle/programs/server/packages/rocketchat_lib.js:8777:54) at [object Object].model.insert (/app/bundle/programs/server/packages/rocketchat_lib.js:8590:24) at [object Object].self.create (/app/bundle/programs/server/packages/jalik_ufs.js:887:31) at /app/bundle/programs/server/packages/rocketchat_slackbridge.js:855:35 at runWithEnvironment (packages/meteor.js:1176:24)
The text was updated successfully, but these errors were encountered: