Closed oakymax closed 6 months ago
Let's see next example from my code:
$telegraph->markdown('Registration needed')->replyKeyboard( ReplyKeyboard::make() ->button('Send contact')->requestContact() ->button('Cancel') ->resize() ->oneTime() ->inputPlaceholder("Waiting for input") )->send();
In this case we will have in resulting markup only buttons and last set keyboard property input_field_placeholder, props resize_keyboard and one_time_keyboard will be skipped...
input_field_placeholder
resize_keyboard
one_time_keyboard
For now I fixed this in my code in following way:
$keyboard = ReplyKeyboard::make(); $keyboard->button('Send contact')->requestContact(); $keyboard->button('Cancel'); $keyboard = $keyboard->resize(); $keyboard = $keyboard->oneTime(); $keyboard = $keyboard->inputPlaceholder("Waiting for input"); $telegraph ->markdown('Registration needed') ->replyKeyboard($keyboard) ->send();
but imho the expected behavior is to keep keyboard's properties assigned in sequential fluent setters call
Let's see next example from my code:
In this case we will have in resulting markup only buttons and last set keyboard property
input_field_placeholder
, propsresize_keyboard
andone_time_keyboard
will be skipped...For now I fixed this in my code in following way:
but imho the expected behavior is to keep keyboard's properties assigned in sequential fluent setters call