Merge pull request #404 from gitroomhq/bugfix-bluesky-links-and-tags
bugfix: #394 Bluesky posts now support "richtext" (URLs, tags, etc)
This commit is contained in:
commit
8fb0729740
|
|
@ -6,7 +6,7 @@ import {
|
|||
} from '@gitroom/nestjs-libraries/integrations/social/social.integrations.interface';
|
||||
import { makeId } from '@gitroom/nestjs-libraries/services/make.is';
|
||||
import { SocialAbstract } from '@gitroom/nestjs-libraries/integrations/social.abstract';
|
||||
import { BskyAgent } from '@atproto/api';
|
||||
import { BskyAgent, RichText } from '@atproto/api';
|
||||
import dayjs from 'dayjs';
|
||||
import { Integration } from '@prisma/client';
|
||||
import { AuthService } from '@gitroom/helpers/auth/auth.service';
|
||||
|
|
@ -132,9 +132,16 @@ export class BlueskyProvider extends SocialAbstract implements SocialProvider {
|
|||
}) || []
|
||||
);
|
||||
|
||||
const rt = new RichText({
|
||||
text: post.message,
|
||||
})
|
||||
|
||||
await rt.detectFacets(agent)
|
||||
|
||||
// @ts-ignore
|
||||
const { cid, uri, commit } = await agent.post({
|
||||
text: post.message,
|
||||
text: rt.text,
|
||||
facets: rt.facets,
|
||||
createdAt: new Date().toISOString(),
|
||||
...(images.length
|
||||
? {
|
||||
|
|
|
|||
Loading…
Reference in New Issue