social media crossposting tool. 3rd time's the charm
mastodon misskey crossposting bluesky

minor fixes

zenfyr.dev 87f1d2c4 6bfd85e1

verified
Changed files
+3 -3
bluesky
+2 -2
bluesky/common.py
···
self.tokens = tokens
self.timestamp = record['createdAt']
labels = record.get('labels', {}).get('values')
if labels:
self.spoiler = ', '.join([str(label['val']).replace('-', ' ') for label in labels])
···
return self.spoiler is not None
def get_post_url(self) -> str | None:
-
parts = str(self.uri[len("at://"):]).split("/")
-
did, _, post_id = parts
return f"https://bsky.app/profile/{did}/post/{post_id}"
···
self.tokens = tokens
self.timestamp = record['createdAt']
labels = record.get('labels', {}).get('values')
+
self.spoiler = None
if labels:
self.spoiler = ', '.join([str(label['val']).replace('-', ' ') for label in labels])
···
return self.spoiler is not None
def get_post_url(self) -> str | None:
+
did, _, post_id = str(self.uri[len("at://"):]).split("/")
return f"https://bsky.app/profile/{did}/post/{post_id}"
+1 -1
main.py
···
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id TEXT NOT NULL,
service TEXT NOT NULL,
-
identifier TEXT NOT NULL UNIQUE,
parent_id INTEGER NULL REFERENCES posts(id) ON DELETE SET NULL,
root_id INTEGER NULL REFERENCES posts(id) ON DELETE SET NULL
);
···
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id TEXT NOT NULL,
service TEXT NOT NULL,
+
identifier TEXT NOT NULL,
parent_id INTEGER NULL REFERENCES posts(id) ON DELETE SET NULL,
root_id INTEGER NULL REFERENCES posts(id) ON DELETE SET NULL
);