✨ Allow user to embed live stream webpage
This commit is contained in:
parent
7dbb858d69
commit
c96e5bffa1
@ -40,6 +40,8 @@ func createVideo(c *fiber.Ctx) error {
|
||||
VisibleUsers []uint `json:"visible_users_list"`
|
||||
InvisibleUsers []uint `json:"invisible_users_list"`
|
||||
Visibility *int8 `json:"visibility"`
|
||||
Renderer *string `json:"renderer"`
|
||||
IsLive bool `json:"is_live"`
|
||||
IsDraft bool `json:"is_draft"`
|
||||
Realm *uint `json:"realm"`
|
||||
}
|
||||
@ -57,9 +59,11 @@ func createVideo(c *fiber.Ctx) error {
|
||||
Thumbnail: data.Thumbnail,
|
||||
Video: data.Video,
|
||||
Title: data.Title,
|
||||
Renderer: data.Renderer,
|
||||
Description: data.Description,
|
||||
Location: data.Location,
|
||||
Subtitles: data.Subtitles,
|
||||
IsLive: data.IsLive,
|
||||
}
|
||||
|
||||
var bodyMapping map[string]any
|
||||
@ -136,6 +140,8 @@ func editVideo(c *fiber.Ctx) error {
|
||||
VisibleUsers []uint `json:"visible_users_list"`
|
||||
InvisibleUsers []uint `json:"invisible_users_list"`
|
||||
Visibility *int8 `json:"visibility"`
|
||||
Renderer *string `json:"renderer"`
|
||||
IsLive bool `json:"is_live"`
|
||||
IsDraft bool `json:"is_draft"`
|
||||
}
|
||||
|
||||
@ -178,6 +184,8 @@ func editVideo(c *fiber.Ctx) error {
|
||||
Description: data.Description,
|
||||
Location: data.Location,
|
||||
Subtitles: data.Subtitles,
|
||||
Renderer: data.Renderer,
|
||||
IsLive: data.IsLive,
|
||||
}
|
||||
|
||||
var bodyMapping map[string]any
|
||||
|
@ -102,6 +102,7 @@ type PostVideoBody struct {
|
||||
Description *string `json:"description"`
|
||||
Location *string `json:"location"`
|
||||
Video string `json:"video"`
|
||||
Renderer *string `json:"renderer"`
|
||||
IsLive bool `json:"is_live"`
|
||||
IsLiveEnded bool `json:"is_live_ended"`
|
||||
Subtitles map[string]string `json:"subtitles"`
|
||||
|
@ -2,6 +2,7 @@ package queries
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/goccy/go-json"
|
||||
|
||||
@ -82,7 +83,7 @@ func CompletePostMeta(in ...models.Post) ([]models.Post, error) {
|
||||
attachmentsRid = append(attachmentsRid, bodies[idx].Attachments...)
|
||||
for _, field := range singularAttachmentFields {
|
||||
if raw, ok := info.Body[field]; ok {
|
||||
if str, ok := raw.(string); ok {
|
||||
if str, ok := raw.(string); ok && !strings.HasPrefix(str, "http") {
|
||||
attachmentsRid = append(attachmentsRid, str)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user