···2424 self.tokens = tokens
2525 self.timestamp = record['createdAt']
2626 labels = record.get('labels', {}).get('values')
2727+ self.spoiler = None
2728 if labels:
2829 self.spoiler = ', '.join([str(label['val']).replace('-', ' ') for label in labels])
2930···5960 return self.spoiler is not None
60616162 def get_post_url(self) -> str | None:
6262- parts = str(self.uri[len("at://"):]).split("/")
6363- did, _, post_id = parts
6363+ did, _, post_id = str(self.uri[len("at://"):]).split("/")
64646565 return f"https://bsky.app/profile/{did}/post/{post_id}"
6666
+1-1
main.py
···7676 id INTEGER PRIMARY KEY AUTOINCREMENT,
7777 user_id TEXT NOT NULL,
7878 service TEXT NOT NULL,
7979- identifier TEXT NOT NULL UNIQUE,
7979+ identifier TEXT NOT NULL,
8080 parent_id INTEGER NULL REFERENCES posts(id) ON DELETE SET NULL,
8181 root_id INTEGER NULL REFERENCES posts(id) ON DELETE SET NULL
8282 );