-
Notifications
You must be signed in to change notification settings - Fork 603
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
Sshchat fixes #675
Sshchat fixes #675
Conversation
Thanks! |
@@ -33,7 +33,7 @@ func (b *Bsshchat) Connect() error { | |||
b.r = bufio.NewScanner(r) | |||
b.r.Scan() | |||
b.w = w | |||
if _, err := b.w.Write([]byte("/theme mono\r\n")); err != nil { | |||
if _, err := b.w.Write([]byte("/theme mono\r\n/quiet\r\n")); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
totes agree that "quiet" makes sense, @ValdikSS :) you're a hero
just want to flag for later (if interested) that quiet mode messages could perhaps also be dropped in the gateway by tagging these sshchat messages as msg.Event = config.EventJoinLeave
on their way into the gateway from sshchat bridge :)
matterbridge/gateway/handlers.go
Lines 148 to 168 in ccd55d2
// ignoreEvent returns true if we need to ignore this event for the specified destination bridge. | |
func (gw *Gateway) ignoreEvent(event string, dest *bridge.Bridge) bool { | |
switch event { | |
case config.EventAvatarDownload: | |
// Avatar downloads are only relevant for telegram and mattermost for now | |
if dest.Protocol != "mattermost" && dest.Protocol != "telegram" { | |
return true | |
} | |
case config.EventJoinLeave: | |
// only relay join/part when configured | |
if !dest.GetBool("ShowJoinPart") { | |
return true | |
} | |
case config.EventTopicChange: | |
// only relay topic change when used in some way on other side | |
if dest.GetBool("ShowTopicChange") && dest.GetBool("SyncTopic") { | |
return true | |
} | |
} | |
return false | |
} |
* SSH-Chat: set quiet mode to filter joins/quits * SSH-Chat: Trim newlines in the end of relayed messages * SSH-Chat: fix media links * SSH-Chat: do not relay "Rate limiting is in effect" message
The patchset fixes most annoying SSH-Chat problems.