Fix: attachment name for incoming messages

Use original_filename to get the name of the file attached to the message.

Had to add the message_type method to the WhatsApp/incoming_message_service due to the Assignment Branch Condition linter error for the attach_files method.

Fixes #4183
This commit is contained in:
Shivam Chahar
2022-04-28 21:02:17 +05:30
committed by GitHub
parent 8d04894744
commit 04194e7247
3 changed files with 7 additions and 4 deletions

View File

@@ -105,7 +105,7 @@ class Telegram::IncomingMessageService
file_type: file_content_type,
file: {
io: attachment_file,
filename: attachment_file,
filename: attachment_file.original_filename,
content_type: attachment_file.content_type
}
)