matrix-puppet-slack icon indicating copy to clipboard operation
matrix-puppet-slack copied to clipboard

When a Slack user posts a message in a Slack Thread, a blank event from the Matrix user running the bridge is posted in the room before the message from Slack

Open thomas-profitt opened this issue 7 years ago • 3 comments

screenshot from 2018-11-08 21-43-03

screenshot from 2018-11-08 21-43-54

thomas-profitt avatar Nov 09 '18 03:11 thomas-profitt

Just want to poke this as I came to report it. It adds a lot of noise too Riot especially in a slack instance that uses a lot of threads.

zoglesby avatar Nov 08 '19 00:11 zoglesby

I'm facing this bug as well. Any workaround available?

wapsi avatar Jan 16 '20 07:01 wapsi

It looks like matrix-puppet-slack is generating empty messages with message body content: ' \ufeff' for some reason? So I created an ugly workaround but it works for me (it doesn't fix the root cause but filters these empty messages sent by my user):

After npm install has executed I manually edited files: node_modules/matrix-js-sdk/lib/client.js node_modules/matrix-js-sdk/src/client.js by adding following code

    if (content.body == ' \ufeff') {
        console.log(`Skipping empty event created by matrix-puppet-slack (BUG: https://github.com/matrix-hacks/matrix-puppet-slack/issues/57)`);
        return;
    }

after line: console.log("sendEvent of type " + eventType + " in " + roomId + " with txnId " + txnId); And then restarted the matrix-puppet-slack.

wapsi avatar Jan 22 '20 06:01 wapsi