Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

[MM-41339] commands/webhook: add user id to the request payload #436

Merged
merged 4 commits into from
Feb 3, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions commands/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ func createIncomingWebhookCmdF(c client.Client, command *cobra.Command, args []s
IconURL: iconURL,
ChannelLocked: channelLocked,
Username: user.Username,
UserId: user.Id,
}

createdIncoming, _, err := c.CreateIncomingWebhook(incomingWebhook)
Expand Down
2 changes: 2 additions & 0 deletions commands/webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ func (s *MmctlUnitTestSuite) TestCreateIncomingWebhookCmd() {
ChannelId: channelID,
Username: userName,
DisplayName: displayName,
UserId: userID,
}
returnedIncomingWebhook := mockIncomingWebhook
returnedIncomingWebhook.Id = incomingWebhookID
Expand Down Expand Up @@ -210,6 +211,7 @@ func (s *MmctlUnitTestSuite) TestCreateIncomingWebhookCmd() {
ChannelId: channelID,
Username: userName,
DisplayName: displayName,
UserId: userID,
}
mockError := errors.New("mock error")

Expand Down