Schedule posts to Bluesky with Cloudflare workers. skyscheduler.work
cf tool bsky-tool cloudflare bluesky schedule bsky service social-media cloudflare-workers

make it appear properly

substr in sqllite is non-inclusive, so increase by 1 to fit

+2 -2
+1 -1
src/layout/postList.tsx
··· 13 13 }; 14 14 15 15 export function PostContentObject(props: PostContentObjectProps) { 16 - const ellipses = props.posted && !props.repost && props.text.length >= MAX_POSTED_LENGTH ? "..." : ""; 16 + const ellipses = props.posted && !props.repost && props.text.length >= (MAX_POSTED_LENGTH-1) ? "..." : ""; 17 17 return (<p class="postText">{props.text}{ellipses}</p>); 18 18 } 19 19
+1 -1
src/utils/db/data.ts
··· 137 137 138 138 let wasPosted = (i == 0 && !allPosted) ? false : true; 139 139 dbOperations.push(db.update(posts).set( 140 - {content: sql`substr(posts.content, 0, ${MAX_POSTED_LENGTH})`, posted: wasPosted, uri: record.uri, cid: record.cid, embedContent: []}) 140 + {content: sql`substr(posts.content, 0, ${MAX_POSTED_LENGTH+1})`, posted: wasPosted, uri: record.uri, cid: record.cid, embedContent: []}) 141 141 .where(eq(posts.uuid, record.postID))); 142 142 } 143 143