mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 17:07:07 +00:00
upload: Remove incorrect animated GIF asserts.
GIF files can be `.GIF`, and also we determine the file format by inspecting the image data, so there's no reason to have this assertion. (The code for serving still images does not rely on the file being a GIF.)
This commit is contained in:
@@ -715,8 +715,6 @@ class S3UploadBackend(ZulipUploadBackend):
|
||||
|
||||
def get_emoji_url(self, emoji_file_name: str, realm_id: int, still: bool = False) -> str:
|
||||
if still:
|
||||
# We currently only support animated GIFs.
|
||||
assert emoji_file_name.endswith(".gif")
|
||||
emoji_path = RealmEmoji.STILL_PATH_ID_TEMPLATE.format(
|
||||
realm_id=realm_id,
|
||||
emoji_filename_without_extension=os.path.splitext(emoji_file_name)[0],
|
||||
@@ -968,8 +966,6 @@ class LocalUploadBackend(ZulipUploadBackend):
|
||||
|
||||
def get_emoji_url(self, emoji_file_name: str, realm_id: int, still: bool = False) -> str:
|
||||
if still:
|
||||
# We currently only support animated GIFs.
|
||||
assert emoji_file_name.endswith(".gif")
|
||||
return os.path.join(
|
||||
"/user_avatars",
|
||||
RealmEmoji.STILL_PATH_ID_TEMPLATE.format(
|
||||
|
||||
Reference in New Issue
Block a user