Skip to content
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

Allow ignoring Mattermost server version when checking if supported #541

Merged
merged 1 commit into from
Aug 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions matterircd.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ PasteBufferTimeout = 2500
#use http connection to mattermost (default false)
Insecure = false

#ignore the Mattermost server version when checking if supported
#ignoreserverversion = false

#an array of channels that only will be joined on IRC. JoinExlude and JoinInclude will not be checked
#regexp is supported
#If it's empty, it means all channels get joined (except those defined in JoinExclude)
Expand Down
2 changes: 1 addition & 1 deletion mm-go-irckit/userbridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ func (u *User) loginTo(protocol string) error {
u.br, err = slack.New(u.v, u.Credentials, u.eventChan, u.addUsersToChannels)
case "mattermost":
u.eventChan = make(chan *bridge.Event)
if strings.HasPrefix(u.getMattermostVersion(), "7.") || strings.HasPrefix(u.getMattermostVersion(), "8.") {
if u.v.GetBool("mattermost.ignoreserverversion") || strings.HasPrefix(u.getMattermostVersion(), "7.") || strings.HasPrefix(u.getMattermostVersion(), "8.") {
u.br, _, err = mattermost.New(u.v, u.Credentials, u.eventChan, u.addUsersToChannels)
} else {
return fmt.Errorf("mattermost version %s not supported", u.getMattermostVersion())
Expand Down