diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 6351507e..ba95ab2c 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -2218,8 +2218,8 @@ updateChatDraftMessage chat_id:int53 draft_message:draftMessage order:int64 = Up //@description A list of active notifications in a notification group has changed @notification_group_id Unique notification group identifier @chat_id Identifier of a chat to which all notifications in the group belong //@notification_settings_chat_id Chat identifier, which notification settings must be applied @silent True, if the notifications should be shown without sound -//@total_count Total number of active notifications in the group @new_notifications List of new group notifications @edited_notifications List of edited group notifications @deleted_notification_ids Identifiers of deleted group notifications -updateNotificationGroup chat_id:int53 notification_group_id:int32 notification_settings_chat_id:int53 silent:Bool total_count:int32 new_notifications:vector edited_notifications:vector deleted_notification_ids:vector = Update; +//@total_count Total number of active notifications in the group @new_notifications List of new group notifications @edited_notifications List of edited group notifications @removed_notification_ids Identifiers of removed group notifications +updateNotificationGroup chat_id:int53 notification_group_id:int32 notification_settings_chat_id:int53 silent:Bool total_count:int32 new_notifications:vector edited_notifications:vector removed_notification_ids:vector = Update; //@description Contains active notifications that was shown on previous application launches. This update is sent only if a message database is used. In that case it comes once before any updateNotificationGroup update @groups Lists of active notification groups updateActiveNotifications groups:vector = Update; diff --git a/td/generate/scheme/td_api.tlo b/td/generate/scheme/td_api.tlo index a5b61912..35be0953 100644 Binary files a/td/generate/scheme/td_api.tlo and b/td/generate/scheme/td_api.tlo differ diff --git a/tdutils/td/utils/tl_helpers.h b/tdutils/td/utils/tl_helpers.h index 7cb0b671..2e0db461 100644 --- a/tdutils/td/utils/tl_helpers.h +++ b/tdutils/td/utils/tl_helpers.h @@ -19,34 +19,42 @@ #include #define BEGIN_STORE_FLAGS() \ - uint32 flags_store = 0; \ + do { \ + uint32 flags_store = 0; \ uint32 bit_offset_store = 0 #define STORE_FLAG(flag) \ flags_store |= (flag) << bit_offset_store; \ bit_offset_store++ -#define END_STORE_FLAGS() \ - CHECK(bit_offset_store < 31); \ - td::store(flags_store, storer) +#define END_STORE_FLAGS() \ + CHECK(bit_offset_store < 31); \ + td::store(flags_store, storer); \ + } \ + while (false) -#define BEGIN_PARSE_FLAGS() \ - uint32 flags_parse; \ - uint32 bit_offset_parse = 0; \ +#define BEGIN_PARSE_FLAGS() \ + do { \ + uint32 flags_parse; \ + uint32 bit_offset_parse = 0; \ td::parse(flags_parse, parser) #define PARSE_FLAG(flag) \ flag = ((flags_parse >> bit_offset_parse) & 1) != 0; \ bit_offset_parse++ -#define END_PARSE_FLAGS() \ - CHECK(bit_offset_parse < 31); \ - CHECK((flags_parse & ~((1 << bit_offset_parse) - 1)) == 0) \ - << flags_parse << " " << bit_offset_parse << " " << parser.version(); +#define END_PARSE_FLAGS() \ + CHECK(bit_offset_parse < 31); \ + CHECK((flags_parse & ~((1 << bit_offset_parse) - 1)) == 0) \ + << flags_parse << " " << bit_offset_parse << " " << parser.version(); \ + } \ + while (false) -#define END_PARSE_FLAGS_GENERIC() \ - CHECK(bit_offset_parse < 31); \ - CHECK((flags_parse & ~((1 << bit_offset_parse) - 1)) == 0) << flags_parse << " " << bit_offset_parse; +#define END_PARSE_FLAGS_GENERIC() \ + CHECK(bit_offset_parse < 31); \ + CHECK((flags_parse & ~((1 << bit_offset_parse) - 1)) == 0) << flags_parse << " " << bit_offset_parse; \ + } \ + while (false) namespace td { template