Skip to content

Commit e80270f

Browse files
committed
Fix get_input_page_table_cell.
1 parent 2fe4156 commit e80270f

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

td/telegram/WebPageBlock.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -575,16 +575,19 @@ class WebPageBlockTableCell {
575575

576576
telegram_api::object_ptr<telegram_api::pageTableCell> get_input_page_table_cell(
577577
const Td *td, vector<telegram_api::object_ptr<telegram_api::InputDocument>> &documents) const {
578-
int32 flags = telegram_api::pageTableCell::TEXT_MASK;
578+
int32 flags = 0;
579579
if (colspan != 1) {
580580
flags |= telegram_api::pageTableCell::COLSPAN_MASK;
581581
}
582582
if (rowspan != 1) {
583583
flags |= telegram_api::pageTableCell::ROWSPAN_MASK;
584584
}
585+
if (!text.empty()) {
586+
flags |= telegram_api::pageTableCell::TEXT_MASK;
587+
}
585588
return telegram_api::make_object<telegram_api::pageTableCell>(
586-
0, is_header, align_center, align_right, valign_middle, valign_bottom, text.get_input_rich_text(td, documents),
587-
colspan, rowspan);
589+
flags, is_header, align_center, align_right, valign_middle, valign_bottom,
590+
text.empty() ? nullptr : text.get_input_rich_text(td, documents), colspan, rowspan);
588591
}
589592

590593
td_api::object_ptr<td_api::pageBlockTableCell> get_page_block_table_cell_object(

0 commit comments

Comments
 (0)