File tree Expand file tree Collapse file tree
backend/src/serverless/integrations/usecases/linkedin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,21 +33,23 @@ export const getOrganizationPosts = async (
3333
3434 let stop = false
3535
36- const elements = response . elements . map ( ( e ) => {
37- if ( lookBackUntilTs && e . createdAt <= lookBackUntilTs ) {
38- stop = true
39- }
36+ const elements = response . elements
37+ . filter ( ( e ) => e . publishedAt !== undefined )
38+ . map ( ( e ) => {
39+ if ( lookBackUntilTs && e . createdAt <= lookBackUntilTs ) {
40+ stop = true
41+ }
4042
41- return {
42- urnId : e . id ,
43- lifecycleState : e . lifecycleState ,
44- visibility : e . visibility ,
45- authorUrn : e . author ,
46- body : e . commentary ,
47- originalUrnId : e . reshareContext ?. parent ,
48- timestamp : e . createdAt ,
49- }
50- } )
43+ return {
44+ urnId : e . id ,
45+ lifecycleState : e . lifecycleState ,
46+ visibility : e . visibility ,
47+ authorUrn : e . author ,
48+ body : e . commentary ,
49+ originalUrnId : e . reshareContext ?. parent ,
50+ timestamp : e . createdAt ,
51+ }
52+ } )
5153
5254 if ( stop ) {
5355 return {
You can’t perform that action at this time.
0 commit comments