Skip to content
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

report ファイルアップロード後のウェブフックに recording_metadata を追加する #49

Merged
merged 5 commits into from
Oct 30, 2024

Conversation

tnamao
Copy link
Collaborator

@tnamao tnamao commented Oct 29, 2024

変更履歴

  • [UPDATE] report ファイルアップロード後のウェブフックに recording_metadata を追加する
    • アップロードした report ファイルの recording_metadata または metadata の内容をウェブフックの recording_metadata に含めて送信する
      • セッション録画の場合は recording_metadata の値を使用する
      • レガシー録画の場合は metadata の値を使用する
      • ウェブフックに含める際のキーはセッション録画でもレガシー録画でも共通で recording_metadata に設定する
    • report ファイルに recording_metadata または metadata のキーが存在しない場合にはウェブフックにも recording_metadata を含めない
    • @tnamao

This pull request includes several updates to enhance the handling of recording metadata and improve the webhook functionality. The most important changes include adding new fields to the RecordingReport and WebhookReportUploaded structures, updating the webhook logic to handle different types of recordings, and making necessary imports for JSON handling.

Enhancements to recording metadata handling:

  • uploader.go: Added SessionID, Metadata, and RecordingMetadata fields to the RecordingReport structure to support different types of recording metadata.
  • uploader.go: Updated the handleReport function to differentiate between session recordings and legacy recordings based on the SessionID field and set the RecordingMetadata accordingly.

Webhook improvements:

  • webhook.go: Added RecordingMetadata field to the WebhookReportUploaded structure to include recording metadata in the webhook payload.

Additional updates:

  • webhook.go: Added the encoding/json import to handle JSON operations required for the new fields.

Documentation updates:

  • CHANGES.md: Documented the addition of recording_metadata to the webhook after file upload, including details on handling session and legacy recordings.

@tnamao tnamao requested review from Hexa and voluntas October 29, 2024 02:22
@voluntas
Copy link
Member

voluntas commented Oct 29, 2024

@tnamao 別 PR でよいのですが、これ設定としてデフォルト有効で追加してもらえますか?

@tnamao
Copy link
Collaborator Author

tnamao commented Oct 29, 2024

デフォルト 有効 ですね。了解です

@tnamao
Copy link
Collaborator Author

tnamao commented Oct 29, 2024

レガシー録画の考慮漏れがあったので追加で修正しました

Copy link
Contributor

@Hexa Hexa left a comment

Choose a reason for hiding this comment

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

LGTM です

@tnamao
Copy link
Collaborator Author

tnamao commented Oct 30, 2024

マージします

@tnamao tnamao merged commit f5141a4 into develop Oct 30, 2024
1 check passed
@tnamao tnamao deleted the feature/add-recording-metadata branch October 30, 2024 04:05
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.

3 participants