matrix-hacks / matrix-puppet-slack

puppet style slack bridge for matrix
47 stars 17 forks source link

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 #57

Open thomas-profitt opened 5 years ago

thomas-profitt commented 5 years ago

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

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

zoglesby commented 4 years ago

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.

wapsi commented 4 years ago

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

wapsi commented 4 years ago

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.