mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-17 20:26:24 +02:00
fix: ensure persistence of video data for scheduled reels and correct publication type
This commit is contained in:
1 parent
d62ecffaac
commit
c9f7f7e9ec
2 files changed
+29
-1
No files matched your search
@@ -59,6 +59,18 @@ export class FacebookService {
|
||||
|
||||
// Return all story IDs joined together
|
||||
return storyIds.join(',');
|
||||
} else if (postType === 'reel') {
|
||||
// Publish as Reel
|
||||
if (mediaList.length === 0) {
|
||||
throw new Error('Reels require a video');
|
||||
}
|
||||
|
||||
const videoMedia = mediaList.find(m => m.type === 'video');
|
||||
if (!videoMedia) {
|
||||
throw new Error('Reels require a video media');
|
||||
}
|
||||
|
||||
return await this.publishReel(page, videoMedia.originalUrl, post.content);
|
||||
} else {
|
||||
// Default to feed
|
||||
const imageMedia = mediaList.filter(m => m.type === 'image');
|
||||
|
||||
Reference in new issue
Block a user