Skip to content

Conversation

@Naph1o
Copy link

@Naph1o Naph1o commented Aug 16, 2025

close #2729

@Naph1o Naph1o requested a review from Copilot August 16, 2025 06:23
Copy link
Contributor

Copilot AI left a 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.

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)
Copy link

Copilot AI Aug 16, 2025

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.

Copilot uses AI. Check for mistakes.
@Pugma Pugma requested a review from a team September 23, 2025 17:20
@Pugma
Copy link
Contributor

Pugma commented Sep 23, 2025

これは今回の PR での変更箇所ではないんですが、関連する部分として修正が必要だったので対応をお願いします 🙏
docs/v3-api.yaml において、 path parameter の記法が間違っていたようです (#2753)

  "/webhooks/{webhookId}/messages/{messageId}":
    parameters:
      - $ref: "#/components/parameters/webhookIdInPath"
      - $ref: "#/components/parameters/messageIdInPath"

Copy link
Contributor

@Pugma Pugma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

よさそうです!
ただ、今回の PR に関係しないところなんだけど一点修正をお願いしたいです 🙏

Copy link
Contributor

@Pugma Pugma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

対応ありがとうございます!
一つ漏れがありそうだったので、こちらも併せてお願いします 🙏
これができたら Approve 予定です 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Webhookメッセージ編集API

3 participants