tdl icon indicating copy to clipboard operation
tdl copied to clipboard

[Bug] Forward to public link is not working

Open Ganim opened this issue 2 months ago • 4 comments

Describe the bug

I'm trying to use the function to forward to a public link destination.

I've tried the following commands:

tdl forward --from tdl-export.json --to "https://t.me/c/2367079789/14987"
tdl forward --from tdl-export.json --to 'https://t.me/c/2367079789/14987'
tdl forward --from tdl-export.json --to https://t.me/c/2367079789/14987

The commands are as described in the documentation.

However, for all of them I receive the following error:

Error: callback:
    github.com/gotd/td/telegram.(*Client).Run.func3
        github.com/gotd/[email protected]/telegram/connect.go:174
  - resolve dest peer:
    github.com/iyear/tdl/app/forward.Run
        github.com/iyear/tdl/app/forward/forward.go:73
  - unexpected token Operator(":") (1:6)
 | https://t.me/c/2367079789/14987
 | .....^

I believe the error of considering ":" as an operator shouldn't occur when using double or single quotes, since the parameter is being passed as a string. Therefore, I think there might be a bug in how this command is read.

To Reproduce

1 - Run tdl chat export -c CHAT 2 - Run tdl forward --from tdl-export.json --to PUBLIC_LINK_CHAT

Expected behavior

Besides functioning correctly, I believe the documentation could be updated to include a usage example for each of the accepted cases, whether for downloading, uploading, or forwarding. This would mitigate many topics of confusion or false bugs.

Version

Version: 0.19.2 Commit: f7797d8 Date: 2025-09-20T08:36:34Z

go1.23.10 windows/amd64

Which OS are you running tdl on?

Windows

Additional context

Windows 11

Ganim avatar Nov 03 '25 16:11 Ganim