diff --git a/pkg/ircslack/channel.go b/pkg/ircslack/channel.go index adf53dc..95fed22 100644 --- a/pkg/ircslack/channel.go +++ b/pkg/ircslack/channel.go @@ -101,7 +101,7 @@ func (c *Channel) IsPublicChannel() bool { // IsPrivateChannel returns true if the channel is private. func (c *Channel) IsPrivateChannel() bool { - return (c.IsGroup||c.IsChannel) && c.IsPrivate + return (c.IsGroup || c.IsChannel) && c.IsPrivate } // IsMP returns true if it is a multi-party conversation. diff --git a/pkg/ircslack/irc_context.go b/pkg/ircslack/irc_context.go index 90cbeab..10a0a09 100644 --- a/pkg/ircslack/irc_context.go +++ b/pkg/ircslack/irc_context.go @@ -99,9 +99,9 @@ func (ic *IrcContext) Start() { if message.TargetTs != "" { opts = append(opts, slack.MsgOptionTS(message.TargetTs)) if target[1] == ChannelPrefixThread[0] { - idx := strings.Index(target,message.TargetTs) + idx := strings.Index(target, message.TargetTs) // strip the prefixes and the '-timestamp' - target = target[2:idx-1] + target = target[2 : idx-1] } } if _, _, err := ic.SlackClient.PostMessage(target, opts...); err != nil {