Added ability to upload and send media, and more fixes

Uploading and sending media are different things.
Once you have uploaded a media file, you can send
it to many users without uploading it again, since
you have a handle to the uploaded file.

Other fixes include not showing additional data
on error messages and not generating correct
code for sending bytes
This commit is contained in:
Lonami
2016-09-11 13:10:27 +02:00
parent cdb1674a27
commit 7e78b1b6dc
5 changed files with 96 additions and 4 deletions

View File

@@ -282,7 +282,7 @@ def write_onsend_code(builder, arg, args, name=None):
pass # These are actually NOT written! Only used for flags
elif 'bytes' == arg.type:
builder.writeln('writer.write({})'.format(name))
builder.writeln('writer.tgwrite_bytes({})'.format(name))
elif 'date' == arg.type: # Custom format
builder.writeln('writer.tgwrite_date({})'.format(name))