-
Notifications
You must be signed in to change notification settings - Fork 28
feat: webhookのメッセージ編集APIを実装 #2772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
この PR は、Webhook によって投稿されたメッセージを編集するための API エンドポイントを実装します。
- PUT
/api/v3/webhooks/{webhookId}/messages/{messageId}エンドポイントの追加 - メッセージ編集時の署名検証、権限チェック、アーカイブチャンネル制御の実装
- 包括的なテストケースの追加と API ドキュメントの更新
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| router/v3/webhooks.go | EditWebhookMessage ハンドラーの実装とバリデーション処理 |
| router/v3/router.go | 新しい API エンドポイントのルーティング設定 |
| router/v3/webhooks_test.go | EditWebhookMessage の機能テスト |
| docs/v3-api.yaml | API 仕様書への PUT エンドポイントの追加 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
router/v3/router.go
Outdated
| apiNoAuth.POST("/login", h.Login, noLogin) | ||
| apiNoAuth.POST("/logout", h.Logout) | ||
| apiNoAuth.POST("/webhooks/:webhookID", h.PostWebhook, retrieve.WebhookID()) | ||
| apiWebhooks := apiNoAuth.Group("/webhooks/:webhookID", noLogin) |
Copilot
AI
Aug 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The noLogin middleware is already applied to the parent apiNoAuth group. Adding it again to the webhook group creates redundant middleware application.
|
これは今回の PR での変更箇所ではないんですが、関連する部分として修正が必要だったので対応をお願いします 🙏 "/webhooks/{webhookId}/messages/{messageId}":
parameters:
- $ref: "#/components/parameters/webhookIdInPath"
- $ref: "#/components/parameters/messageIdInPath" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
よさそうです!
ただ、今回の PR に関係しないところなんだけど一点修正をお願いしたいです 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
対応ありがとうございます!
一つ漏れがありそうだったので、こちらも併せてお願いします 🙏
これができたら Approve 予定です 🙇
close #2729