42wim / matterbridge

bridge between mattermost, IRC, gitter, xmpp, slack, discord, telegram, rocketchat, twitch, ssh-chat, zulip, whatsapp, keybase, matrix, microsoft teams, nextcloud, mumble, vk and more with REST API (mattermost not required!)
Apache License 2.0
6.66k stars 618 forks source link

Hide join/left messages in Matrix #2092

Open unode opened 1 year ago

unode commented 1 year ago

We have a Matrix channel bridged with a Mattermost channel. When someone joins/leaves the Mattermost channel, Matrix always shows the corresponding message.

The option ShowJoinPart=false is set for Matrix but seems to have no effect. Is this behavior implemented but the option not working correctly? If not, has anyone tried to implement this before? I'd like to contribute a fix so any guidance is appreciated.

The full config from the matrix side is:

[matrix]
    [matrix.space]
    Server="https://matrix.org"
    Login="our_user"
    Password="****"
    NoHomeServerSuffix=false
    PreserveThreading=true
    ShowJoinPart=false

mattermost]
   [mattermost.space]
   Server="server.example.org:443"
   Team="ours"
   Token="****"
   PrefixMessagesWithNick=true
   PreserveThreading=true

[[gateway]]
name="gateway-mm-matrix"
enable=true

    [[gateway.inout]]
    account="matrix.space"
    channel="#channel:matrix.org"

    [[gateway.inout]]
    account="mattermost.space"
    channel="channel"

I tried also adding ShowJoinPart=true at the gateway level (to prevent show/join messages for one specific channel or gateway) but that also had no effect.

The above is with Matterbridge v1.26.0.