Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

feat: disable bluesky videos, add mastodon character validation

Nevo David136f20b7edd0
diff --git a/apps/frontend/src/components/launches/providers/bluesky/bluesky.provider.tsx b/apps/frontend/src/components/launches/providers/bluesky/bluesky.provider.tsx
index c505774fa..cfc1f98cf 100644
--- a/apps/frontend/src/components/launches/providers/bluesky/bluesky.provider.tsx
+++ b/apps/frontend/src/components/launches/providers/bluesky/bluesky.provider.tsx
@@ -1,6 +1,9 @@
import { withProvider } from '@gitroom/frontend/components/launches/providers/high.order.provider';
export default withProvider(null, undefined, undefined, async (posts) => {
+ if (posts.some((p) => p.some(a => a.path.indexOf('mp4') > -1))) {
+ return 'At the moment BlueSky does not support video posts.';
+ }
if (posts.some((p) => p.length > 4)) {
return 'There can be maximum 4 pictures in a post.';
}
diff --git a/apps/frontend/src/components/launches/providers/mastodon/mastodon.provider.tsx b/apps/frontend/src/components/launches/providers/mastodon/mastodon.provider.tsx
index 08680e28b..538c72c9b 100644
--- a/apps/frontend/src/components/launches/providers/mastodon/mastodon.provider.tsx
+++ b/apps/frontend/src/components/launches/providers/mastodon/mastodon.provider.tsx
@@ -1,3 +1,3 @@
import { FC } from 'react';
import { withProvider } from '@gitroom/frontend/components/launches/providers/high.order.provider';
-export default withProvider(null, undefined, undefined, undefined);
+export default withProvider(null, undefined, undefined, undefined, 500);
diff --git a/libraries/nestjs-libraries/src/integrations/social/bluesky.provider.ts b/libraries/nestjs-libraries/src/integrations/social/bluesky.provider.ts
index e81a79c87..246b2a1e0 100644
--- a/libraries/nestjs-libraries/src/integrations/social/bluesky.provider.ts
+++ b/libraries/nestjs-libraries/src/integrations/social/bluesky.provider.ts
@@ -6,7 +6,9 @@ import {
} from '@gitroom/nestjs-libraries/integrations/social/social.integrations.interface';
import { makeId } from '@gitroom/nestjs-libraries/services/make.is';
import {
- NotEnoughScopes, RefreshToken, SocialAbstract
+ NotEnoughScopes,
+ RefreshToken,
+ SocialAbstract,
} from '@gitroom/nestjs-libraries/integrations/social.abstract';
import { BskyAgent, RichText } from '@atproto/api';
import dayjs from 'dayjs';
@@ -165,11 +167,13 @@ export class BlueskyProvider extends SocialAbstract implements SocialProvider {
const cidUrl = [] as { cid: string; url: string; rev: string }[];
for (const post of postDetails) {
const images = await Promise.all(
- post.media?.map(async (p) => {
- return await agent.uploadBlob(
- new Blob([await reduceImageBySize(p.url)])
- );
- }) || []
+ post.media
+ ?.filter((p) => p.url.indexOf('mp4') === -1)
+ .map(async (p) => {
+ return await agent.uploadBlob(
+ new Blob([await reduceImageBySize(p.url)])
+ );
+ }) || []
);
const rt = new RichText({