Commit df628264 authored by vvaltman's avatar vvaltman

fixed bug in load_photo ()

parent 4afd5d5c
...@@ -799,6 +799,7 @@ void do_ ## act ## _ ## tp (struct command *command, int arg_num, struct arg arg ...@@ -799,6 +799,7 @@ void do_ ## act ## _ ## tp (struct command *command, int arg_num, struct arg arg
assert (arg_num == 1);\ assert (arg_num == 1);\
struct tgl_message *M = tgl_message_get (TLS, args[0].num);\ struct tgl_message *M = tgl_message_get (TLS, args[0].num);\
if (M && !(M->flags & TGLMF_SERVICE)) {\ if (M && !(M->flags & TGLMF_SERVICE)) {\
if (ev) { ev->refcnt ++; } \
if (M->media.type == tgl_message_media_photo) { \ if (M->media.type == tgl_message_media_photo) { \
tgl_do_load_photo (TLS, M->media.photo, actf, ev);\ tgl_do_load_photo (TLS, M->media.photo, actf, ev);\
} else if (M->media.type == tgl_message_media_document) {\ } else if (M->media.type == tgl_message_media_document) {\
...@@ -821,6 +822,7 @@ void do_ ## act ## _ ## tp ## _thumb (struct command *command, int arg_num, stru ...@@ -821,6 +822,7 @@ void do_ ## act ## _ ## tp ## _thumb (struct command *command, int arg_num, stru
struct tgl_message *M = tgl_message_get (TLS, args[0].num);\ struct tgl_message *M = tgl_message_get (TLS, args[0].num);\
if (M && !(M->flags & TGLMF_SERVICE)) {\ if (M && !(M->flags & TGLMF_SERVICE)) {\
if (M->media.type == tgl_message_media_document) {\ if (M->media.type == tgl_message_media_document) {\
if (ev) { ev->refcnt ++; } \
tgl_do_load_document_thumb (TLS, M->media.document, actf, ev);\ tgl_do_load_document_thumb (TLS, M->media.document, actf, ev);\
}\ }\
}\ }\
......
Subproject commit c7fb3c04cc796fca03ab9d1e5ecbf8a48a3a76aa Subproject commit d3680da8636f4fdd58c91bb352f1bc9ceccd8961
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment