lhctelegram loses original filenames for operator attachments sent from Telegram.
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
Research direction
Start at GenericmessageCommand::processObject() and trace how Telegram documents, audio, and video messages derive lh_chat_file.upload_name. Reproduce the Telegram operator attachment case and verify that the original message filename is retained, with the file_path basename used only as fallback; also check that operator-uploaded files receive the operator user_id.
Written by the indexing model from the issue text.
Description
Reproduction:
- Enable Telegram operator/client mode.
- Reply to an LHC chat from Telegram with a document named before_update.rsc.
- In LHC DB lh_chat_file.upload_name becomes file_1149.rsc instead of before_update.rsc.
- Any outgoing webhook/REST integration then forwards file_1149.rsc.
Cause:
GenericmessageCommand::processObject() uses Request::getFile()->getResult()->getFilePath()
to derive upload_name. Telegram file_path is not the original filename. For documents/audio/video,
the original filename is available on the message entity itself: document.file_name, audio.file_name,
video.file_name.
Expected:
Use message document/audio/video file_name when present, fallback to getFile().file_path basename.
Additional note:
Files sent by Telegram operators are currently stored with lh_chat_file.user_id = 0, while the message
itself is stored as operator message. It would be more consistent to store the file with operator user_id.
- Dominant language
- PHP
- Stars
- 59
- Forks
- 36
- Avg merge
- 6h 40m
- Merged PRs (30d)
- 4
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from LiveHelperChat/telegram
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 45/100
LiveHelperChat/telegram#70 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
LiveHelperChat/telegram#33 · 1 comment ·
All issues in LiveHelperChat/telegram
Similar issues
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
phpstan/phpstan-doctrine#794 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/static-site-importer#1767 ·