From a5ecbdf648198d098d96e6b70b0719c5facc6102 Mon Sep 17 00:00:00 2001
From: Benjamin Loison <12752145+Benjamin-Loison@users.noreply.github.com>
Date: Sat, 6 Apr 2024 20:37:49 +0200
Subject: [PATCH] Add `channel{Name,Handle,Thumbnails}` to community posts

As requested on [Discord](https://discord.com/channels/933841502155706418/933841503103627316/1226216245897203832).

Like
https://github.com/Benjamin-Loison/YouTube-operational-API/commit/9a607a3906c584ef0a51a6002f1d93645df4c4b7#diff-e097171af35afc2da471ac9f44bd313783d077a0a97bcc61205278d83413a47aR398-R400.
---
 common.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/common.php b/common.php
index c1cfc0f..2fff662 100644
--- a/common.php
+++ b/common.php
@@ -394,6 +394,9 @@ function getCommunityPostFromContent($content)
         $post = [
             'id' => $id,
             'channelId' => $channelId,
+            'channelName' => $common['authorText']['runs'][0]['text'],
+            'channelHandle' => substr($common['authorEndpoint']['browseEndpoint']['canonicalBaseUrl'], 1),
+            'channelThumbnails' => $common['authorThumbnail']['thumbnails'],
             'date' => $date,
             'contentText' => $contentText,
             'likes' => $likes,