Skip to content

Commit

Permalink
[MM-860]: Added message to delete webhook after subscription deletion (
Browse files Browse the repository at this point in the history
  • Loading branch information
Kshitij-Katiyar authored Jan 30, 2025
1 parent 370b803 commit 6b2cd35
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/plugin/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,8 @@ func (p *Plugin) handleUnsubscribe(_ *plugin.Context, args *model.CommandArgs, p
}

repoLink := baseURL + owner + "/" + repo
unsubscribeMessage = fmt.Sprintf("@%v unsubscribed this channel from [%s/%s](%s)", user.Username, owner, repo, repoLink)
unsubscribeMessage = fmt.Sprintf("@%v Unsubscribed this channel from [%s/%s](%s)", user.Username, owner, repo, repoLink)
unsubscribeMessage += fmt.Sprintf("\n Please delete the [webhook](%s) for this subscription unless it's required for other subscriptions.", fmt.Sprintf("%s/settings/hooks", repoLink))

if err := p.createPost(args.ChannelId, p.BotUserID, unsubscribeMessage); err != nil {
return fmt.Sprintf("%s error creating the public post: %s", unsubscribeMessage, err.Error())
Expand Down

0 comments on commit 6b2cd35

Please sign in to comment.