Skip to content

Commit

Permalink
fixed error when sending photo
Browse files Browse the repository at this point in the history
  • Loading branch information
DeekshithSH committed Apr 7, 2022
1 parent 464d91f commit f5011b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion WebStreamer/utils/file_properties.py
Expand Up @@ -52,4 +52,5 @@ def get_hash(media_msg: Message) -> str:

def get_name(media_msg: Message) -> str:
media = get_media_from_message(media_msg)
return media.file_name or ""
file_name=getattr(media, "file_name", "")
return file_name if file_name else ""

0 comments on commit f5011b6

Please sign in to comment.