Skip to content

Commit

Permalink
[MM-426] Review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
raghavaggarwal2308 committed May 2, 2024
1 parent c7c6c05 commit f4b35f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ where
- **ActionDisplayName**: Sets the display name for the user action buttons.
- **ActionName**: Sets the action name used by the plugin to identify which action is taken by a user.
- **ActionSuccessfulMessage**: Message posted after the user takes this action and joins the specified channels.
- **ChannelsAddedTo**: List of channel names the user is added to. Must be the channel handle used in the URL, in lowercase. For example, in the following URL the **channel name** value is `my-channel`: https://example.com/my-team/channels/my-channel
- **ChannelsAddedTo**: List of channel names the user is added to. Must be the channel handle used in the URL, in lowercase. For example, in the following URL the **channel name** value is `my-channel`: https://example.com/my-team/channels/my-channel. If you want to add the user in the all the public channels of the team add "*" in the `ChannelsAddedTo` array.

The preview of the configured messages, as well as the creation of a channel welcome message, can be done via bot commands:
* `/welcomebot help` - Displays usage information.
Expand Down
4 changes: 2 additions & 2 deletions server/welcomebot.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ func (p *Plugin) joinChannel(action *Action, channelName string) {
if channelName == "*" {
page := defaultPage
for {
// Adding user to all the public channels when channel name in '*' (i.e. all)
// Adding user to all the public channels when channel name is '*' (i.e. all)
channels, err := p.client.Channel.ListPublicChannelsForTeam(action.Context.TeamID, page, defaultPerPage)
if err != nil {
p.client.Log.Error("Failed to get all the public channels for the team", "team_id", action.Context.TeamID, "error", err.Error())
Expand All @@ -262,7 +262,7 @@ func (p *Plugin) joinChannel(action *Action, channelName string) {
return
}
} else {
p.client.Log.Error("failed to get channel, continuing to the next channel", "channel_name", channelName, "user_id", action.Context.UserID, "error", err.Error())
p.client.Log.Error("Failed to get channel, continuing to the next channel", "channel_name", channelName, "user_id", action.Context.UserID, "error", err.Error())
}
}
}

0 comments on commit f4b35f9

Please sign in to comment.