matrix-appservice-slack
matrix-appservice-slack copied to clipboard
Matrix -> Slack Puppeting: Images messages are not displayed at slack
Describe the bug After bridging matrix room and slack channel, when sending image at matrix, the image is not synced to slack. Instead, slack got an empty message.
To Reproduce Steps to reproduce the behavior:
- bridge the matrix room and slack channel following guide
- send a image from element macos desktop
- the image was sent successfully from element but the slack got a empty message
text messages and files were bridged successfully, only image was failed.
Expected behavior the slack should receive the image as well(at least a link but should not be empty message)
Screenshots
Image sent at matrix:
Message received at slack:
Desktop (please complete the following information):
- OS: MacOS
- version: 1.9.0
Smartphone (please complete the following information): N/A
Additional context I'm using latest docker image published.
Hi there, we will need logs from the bridge in order to debug this one further. At least logs of debug level to figure out why it's missing messages.
Hello,
I am having the same issue with the bridge using a puppeted account. Here's what I have in the logs and a few screenshots as well:
Jan-25 13:55:52.365 INFO bridge 127.0.0.1 - - [25/Jan/2022:18:55:52 +0000] "PUT /transactions/1432?access_token=<REDACTED> HTTP/1.1" 200 2 "-" "Synapse/1.48.0"
Jan-25 13:55:52.366 INFO Main Handling matrix room message $LvverNLRS1iA_4jfH34ty5AtYKDjLYVQzqBnOcBRWiA !PcvYQqNIDnBZbaMRRx:matrix.mydomain.tld
Jan-25 13:55:53.249 DEBUG SlackEventHandler Received slack event: {
type: 'message',
user: 'UXXXXXXXX',
bot_id: 'BXXXXXXXXX',
suppress_notification: false,
text: '',
team: 'TXXXXXXXX',
bot_profile: {
id: 'BXXXXXXXXX',
deleted: false,
name: 'Matrix Bridge',
updated: 1642187229,
app_id: 'A02U4EA7XCJ',
icons: {
image_36: 'https://a.slack-edge.com/80588/img/plugins/app/bot_36.png',
image_48: 'https://a.slack-edge.com/80588/img/plugins/app/bot_48.png',
image_72: 'https://a.slack-edge.com/80588/img/plugins/app/service_72.png'
},
team_id: 'TXXXXXXXX'
},
attachments: [ { id: 1, fallback: 'PXL_20210911_162724203.jpg' } ],
source_team: 'TXXXXXXXX',
user_team: 'TXXXXXXXX',
channel: 'CXXXXXXXXX',
event_ts: '1643136943.002200',
ts: '1643136943.002200'
} TXXXXXXXX
Jan-25 13:55:53.281 DEBUG BridgedRoom Recent message key add: 1643136943.002200
Jan-25 13:55:53.281 DEBUG PgDatastore upsertEvent: !PcvYQqNIDnBZbaMRRx:matrix.mydomain.tld $LvverNLRS1iA_4jfH34ty5AtYKDjLYVQzqBnOcBRWiA C02RDJ5NA64 1643136943.002200
Jan-25 13:55:53.288 INFO Main Handled $LvverNLRS1iA_4jfH34ty5AtYKDjLYVQzqBnOcBRWiA (!PcvYQqNIDnBZbaMRRx:matrix.mydomain.tld)
Jan-25 13:55:53.834 DEBUG SlackRTMHandler Received Slack user event: @jroy:matrix.mydomain.tld {
type: 'message',
user: 'UXXXXXXXX',
bot_id: 'BXXXXXXXXX',
suppress_notification: false,
text: '',
team: 'TXXXXXXXX',
bot_profile: {
id: 'BXXXXXXXXX',
deleted: false,
name: 'Matrix Bridge',
updated: 1642187229,
app_id: 'AXXXXXXXXX',
icons: {
image_36: 'https://a.slack-edge.com/80588/img/plugins/app/bot_36.png',
image_48: 'https://a.slack-edge.com/80588/img/plugins/app/bot_48.png',
image_72: 'https://a.slack-edge.com/80588/img/plugins/app/service_72.png'
},
team_id: 'TXXXXXXXX'
},
attachments: [ { id: 1, fallback: 'PXL_20210911_162724203.jpg' } ],
source_team: 'TEXXXXXXX',
user_team: 'TXXXXXXXX',
channel: 'CXXXXXXXXX',
event_ts: '1643136943.002200',
ts: '1643136943.002200',
team_id: 'TXXXXXXXX',
team_domain: 'xxxxxxxxx-xxxxxxxxx',
user_id: 'UXXXXXXXX'
}
I'm using the official Synapse server and the elements client.
Same behavior in my instance.
Queistion: how to activate debug logging?
I tried upload a text file. Result:
I can take the string and edit:
- add
https://
- remove
|test.txt
(the filename)
paste in browser an see the content:
look like a simple thing to fix, doesn't it!?
unfortunately not for me, as I never touched the bridges code by now. But I will have a look on the fix to learn how to do such simple (hope it is) stuff.
@Half-Shot I cannot change label - or do I?
Is media_url
properly set in config? https://github.com/matrix-org/matrix-appservice-slack/blob/develop/config/config.sample.yaml#L14
Is
media_url
properly set in config? https://github.com/matrix-org/matrix-appservice-slack/blob/develop/config/config.sample.yaml#L14
In my case, it wasn't set. Setting it solved the problem for sending images, but if I send videos, it sends a link to the video that is on my home server, rather than embedding the video in the Slack chat.
Thank you for your help. I do have it set. Yes. Avatars work, so I assume it's set correct. Because of an other problem I did reboot the host and now: It works. I think we can assume the setting of this parameter is the solution!?
I see this occasionally happen on my selfhosted server which uses the EMS Slack bridge integration. It seems to happen more often with larger images (size and resolution)