diff --git a/defs/bsky.py b/defs/bsky.py index c9dae7d..b7bd4be 100644 --- a/defs/bsky.py +++ b/defs/bsky.py @@ -59,7 +59,9 @@ class Timeline: ) @staticmethod - def get_media_group(text: str, post: HumanPost, has_spoiler: bool) -> list[InputMediaPhoto]: + def get_media_group( + text: str, post: HumanPost, has_spoiler: bool + ) -> list[InputMediaPhoto]: data = [] images = post.images for idx, image in enumerate(images): diff --git a/modules/bsky_api.py b/modules/bsky_api.py index 4062d62..4825035 100644 --- a/modules/bsky_api.py +++ b/modules/bsky_api.py @@ -18,7 +18,7 @@ class Reply(BaseModel): async def process_url(url: str, reply: Reply, override_hidden: bool): url = urlparse(url) - if url.hostname and url.hostname in ["bsky.app"]: + if url.hostname and url.hostname in ["bsky.app", "bsky.xtaolabs.com"]: if url.path.find("profile") < 0: return author_handle = str(url.path[url.path.find("profile") + 8 :].split("/")[0]) @@ -40,7 +40,7 @@ async def process_url(url: str, reply: Reply, override_hidden: bool): print(e) -@bot.on_message(filters.incoming & filters.text & filters.regex(r"bsky.app/")) +@bot.on_message(filters.incoming & filters.text & filters.regex(r"bsky.*?\/profile\/")) async def bsky_share(_: Client, message: Message): text = message.text if not text: