Skip to content

Commit

Permalink
fixup! Add 'caption' to file message
Browse files Browse the repository at this point in the history
Add CLI file caption support
  • Loading branch information
threema-eduard committed Aug 21, 2024
1 parent 631a609 commit 5c77785
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ async def test_send_file(self, cli, server):
output_1 = await cli(
'send-file', 'ECHOECHO', pytest.msgapi['msgapi']['id'],
pytest.msgapi['msgapi']['secret'], pytest.msgapi['msgapi']['private'],
'See the picture?',
server.threema_jpg)
assert output_1
assert len(server.latest_blob_ids) == 1
Expand Down
4 changes: 3 additions & 1 deletion threema/gateway/bin/gateway_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ async def send_video(ctx, **arguments):
@click.argument('secret')
@click.argument('private_key')
@click.argument('file_path')
@click.argument('caption', required=False)
@click.option('-k', '--public-key', help="""
The public key of the recipient. Will be fetched automatically if not provided.
""")
Expand Down Expand Up @@ -452,7 +453,8 @@ async def send_file(ctx, **arguments):
to_id=arguments['to'],
key=public_key,
file_path=arguments['file_path'],
thumbnail_path=arguments['thumbnail_path']
thumbnail_path=arguments['thumbnail_path'],
caption=arguments['caption']
)

# Send message
Expand Down

0 comments on commit 5c77785

Please sign in to comment.