Live video on the AT Protocol
79
fork

Configure Feed

Select the types of activity you want to include in your feed.

Pass bsky PostView to SendLivestreamWebhook

authored by

Natalie Bridgers and committed by
Eli Mallon
251eae27 0f65897c

+4 -3
+3 -2
pkg/integrations/webhook/manager.go
··· 5 5 "fmt" 6 6 "strings" 7 7 8 + "github.com/bluesky-social/indigo/api/bsky" 8 9 "stream.place/streamplace/pkg/integrations/discord" 9 10 "stream.place/streamplace/pkg/integrations/discord/discordtypes" 10 11 "stream.place/streamplace/pkg/streamplace" ··· 34 35 } 35 36 36 37 // SendLivestreamWebhook sends livestream notification to a specific webhook 37 - func SendLivestreamWebhook(ctx context.Context, webhook *streamplace.ServerDefs_Webhook, pdsURL string, lsv *streamplace.Livestream_LivestreamView, spcp *streamplace.ChatProfile) error { 38 + func SendLivestreamWebhook(ctx context.Context, webhook *streamplace.ServerDefs_Webhook, pdsURL string, lsv *streamplace.Livestream_LivestreamView, postView *bsky.FeedDefs_PostView, spcp *streamplace.ChatProfile) error { 38 39 discordWebhook, err := webhookToDiscordWebhook(webhook) 39 40 if err != nil { 40 41 return fmt.Errorf("failed to convert webhook: %w", err) 41 42 } 42 43 43 - return discord.SendLivestream(ctx, discordWebhook, pdsURL, lsv, spcp) 44 + return discord.SendLivestream(ctx, discordWebhook, pdsURL, lsv, postView, spcp) 44 45 } 45 46 46 47 // webhookToDiscordWebhook converts streamplace.ServerDefs_Webhook to discordtypes.Webhook
+1 -1
pkg/statedb/queue_processor.go
··· 125 125 continue 126 126 } 127 127 go func(lexiconWebhook *streamplace.ServerDefs_Webhook, wid string) { 128 - err := webhook.SendLivestreamWebhook(ctx, lexiconWebhook, notificationTask.PDSURL, lsv, notificationTask.ChatProfile) 128 + err := webhook.SendLivestreamWebhook(ctx, lexiconWebhook, notificationTask.PDSURL, lsv, notificationTask.FeedPost, notificationTask.ChatProfile) 129 129 if err != nil { 130 130 log.Error(ctx, "failed to send livestream to webhook", "err", err, "webhook_id", wid) 131 131 err := state.IncrementWebhookError(wid)