File tree 1 file changed +11
-2
lines changed
libraries/nestjs-libraries/src/integrations/social
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,7 @@ export class BlueskyProvider extends SocialAbstract implements SocialProvider {
116
116
117
117
let loadCid = '' ;
118
118
let loadUri = '' ;
119
+ const cidUrl = [ ] as { cid : string ; url : string , rev : string } [ ] ;
119
120
for ( const post of postDetails ) {
120
121
const images = await Promise . all (
121
122
post . media ?. map ( async ( p ) => {
@@ -129,7 +130,8 @@ export class BlueskyProvider extends SocialAbstract implements SocialProvider {
129
130
} ) || [ ]
130
131
) ;
131
132
132
- const { cid, uri } = await agent . post ( {
133
+ // @ts -ignore
134
+ const { cid, uri, commit } = await agent . post ( {
133
135
text : post . message ,
134
136
createdAt : new Date ( ) . toISOString ( ) ,
135
137
...( images . length
@@ -162,8 +164,15 @@ export class BlueskyProvider extends SocialAbstract implements SocialProvider {
162
164
163
165
loadCid = loadCid || cid ;
164
166
loadUri = loadUri || uri ;
167
+
168
+ cidUrl . push ( { cid, url : uri , rev : commit . rev } ) ;
165
169
}
166
170
167
- return [ ] ;
171
+ return postDetails . map ( ( p , index ) => ( {
172
+ id : p . id ,
173
+ postId : cidUrl [ index ] . cid ,
174
+ status : 'completed' ,
175
+ releaseURL : `https://bsky.app/profile/${ id } /post/${ cidUrl [ index ] . url . split ( '/' ) . pop ( ) } ` ,
176
+ } ) ) ;
168
177
}
169
178
}
You can’t perform that action at this time.
0 commit comments