Skip to content

Commit

Permalink
Fix issue of settings command working for non-connected users (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayusht2810 authored Jul 12, 2024
1 parent 780f69b commit 8056f5a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions server/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,14 @@ func (p *Plugin) runHelpCommand(user *model.User) (string, error) {
}

func (p *Plugin) runSettingCommand(args *model.CommandArgs, params []string, user *model.User) (string, error) {
if _, authErr := p.authenticateAndFetchZoomUser(user); authErr != nil {
// the user state will be needed later while connecting the user to Zoom via OAuth
if appErr := p.storeOAuthUserState(user.Id, args.ChannelId, false); appErr != nil {
p.API.LogWarn("failed to store user state")
}
return authErr.Message, authErr.Err
}

if len(params) == 0 {
if err := p.sendUserSettingForm(user.Id, args.ChannelId, args.RootId); err != nil {
return "", err
Expand Down

0 comments on commit 8056f5a

Please sign in to comment.