1010from src import localizer
1111from src .config import settings
1212from src .flows .events import safe_emit
13+ from src .tgbot .buttons import styled_inline_keyboard_button
1314from src .tgbot .service import assign_experiment , get_experiment_variant
1415
1516logger = logging .getLogger (__name__ )
@@ -126,12 +127,13 @@ def build_meme_share_button(
126127 variant : str ,
127128 interface_lang : str | None ,
128129 meme_type : str | None = None ,
130+ style : str | None = None ,
129131) -> InlineKeyboardButton :
130132 # Cached inline results are reliable for photos/videos. Animation file IDs
131133 # may be GIF or MPEG4, so use the URL adapter until we store the subtype.
132134 supports_exact_inline = meme_type not in {"animation" }
133135 if variant == MEME_SHARE_BUTTON_INLINE and supports_exact_inline :
134- return InlineKeyboardButton (
136+ return styled_inline_keyboard_button (
135137 text ,
136138 switch_inline_query_chosen_chat = SwitchInlineQueryChosenChat (
137139 query = get_meme_inline_query (meme_id ),
@@ -140,9 +142,11 @@ def build_meme_share_button(
140142 allow_group_chats = True ,
141143 allow_channel_chats = True ,
142144 ),
145+ style = style ,
143146 )
144147
145- return InlineKeyboardButton (
148+ return styled_inline_keyboard_button (
146149 text ,
147150 url = get_meme_share_url (user_id , meme_id , interface_lang ),
151+ style = style ,
148152 )
0 commit comments