diff --git a/astrbot/core/platform/sources/line/line_event.py b/astrbot/core/platform/sources/line/line_event.py index 04be53922..8b82ad182 100644 --- a/astrbot/core/platform/sources/line/line_event.py +++ b/astrbot/core/platform/sources/line/line_event.py @@ -104,7 +104,7 @@ async def _component_to_message_object( @staticmethod async def _resolve_image_url(segment: Image) -> str: candidate = (segment.url or segment.file or "").strip() - if candidate.startswith("http://") or candidate.startswith("https://"): + if candidate.startswith("https://"): return candidate try: return await segment.register_to_file_service() @@ -115,7 +115,7 @@ async def _resolve_image_url(segment: Image) -> str: @staticmethod async def _resolve_record_url(segment: Record) -> str: candidate = (segment.url or segment.file or "").strip() - if candidate.startswith("http://") or candidate.startswith("https://"): + if candidate.startswith("https://"): return candidate try: return await segment.register_to_file_service() @@ -137,7 +137,7 @@ async def _resolve_record_duration(segment: Record) -> int: @staticmethod async def _resolve_video_url(segment: Video) -> str: candidate = (segment.file or "").strip() - if candidate.startswith("http://") or candidate.startswith("https://"): + if candidate.startswith("https://"): return candidate try: return await segment.register_to_file_service() @@ -148,9 +148,7 @@ async def _resolve_video_url(segment: Video) -> str: @staticmethod async def _resolve_video_preview_url(segment: Video) -> str: cover_candidate = (segment.cover or "").strip() - if cover_candidate.startswith("http://") or cover_candidate.startswith( - "https://" - ): + if cover_candidate.startswith("https://"): return cover_candidate if cover_candidate: @@ -191,7 +189,7 @@ async def _resolve_video_preview_url(segment: Video) -> str: @staticmethod async def _resolve_file_url(segment: File) -> str: - if segment.url and segment.url.startswith(("http://", "https://")): + if segment.url and segment.url.startswith("https://"): return segment.url try: return await segment.register_to_file_service()