Skip to content

Commit

Permalink
Merge pull request #8 from enriquefaci/ForMeCommand
Browse files Browse the repository at this point in the history
Defaulting for command to request user.
  • Loading branch information
thoeni committed Oct 4, 2017
2 parents c5511ef + a583464 commit 79fc5d5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ func forCommand(slackCommandArgs []string, slackRequest slackRequest) (*slackRes

var r slackResponse = NewEphemeral()

user := slackCommandArgs[0]
var user string = slackCommandArgs[0]
if strings.ToLower(user) == "me" {
user = slackRequest.Username
}

id := fmt.Sprintf("%s-%s", slackRequest.TeamID, user[1:])

lines, err := getLinesFor(id)
Expand Down

0 comments on commit 79fc5d5

Please sign in to comment.