@@ -49,8 +49,7 @@ static const char *telebot_update_type_str[TELEBOT_UPDATE_TYPE_MAX] = {
4949 "shipping_query" ,
5050 "pre_checkout_query" ,
5151 "poll" ,
52- "poll_answer"
53- };
52+ "poll_answer" };
5453
5554static void telebot_put_user (telebot_user_t * user );
5655static void telebot_put_chat_photo (telebot_chat_photo_t * photo );
@@ -619,17 +618,15 @@ telebot_error_e telebot_send_video_note(telebot_handler_t handle, long long int
619618telebot_error_e telebot_send_media_group (telebot_handler_t handle , long long int chat_id , char * media_paths [],
620619 int count , bool disable_notification , int reply_to_message_id )
621620{
622- telebot_hdata_t * _handle = (telebot_hdata_t * )handle ;
623- if (_handle == NULL )
624- return TELEBOT_ERROR_NOT_SUPPORTED ;
621+ telebot_core_response_t response ;
625622
626623 if ((media_paths == NULL ) || (count < 2 ) || (count > 10 ))
627624 return TELEBOT_ERROR_INVALID_PARAMETER ;
628625
629- telebot_core_response_t response ;
630- telebot_error_e ret = telebot_core_send_media_group ( _handle -> core_h , chat_id , media_paths , count , disable_notification ,
631- reply_to_message_id , & response );
632- telebot_core_put_response (& response );
626+ response = telebot_core_send_media_group ( handle -> core_h , chat_id , media_paths , count , disable_notification ,
627+ reply_to_message_id );
628+ int ret = telebot_core_get_response_code ( response );
629+ telebot_core_put_response (response );
633630 return ret ;
634631}
635632
@@ -1603,7 +1600,7 @@ telebot_error_e telebot_put_chat(telebot_chat_t *chat)
16031600 telebot_put_chat_photo (chat -> photo );
16041601 TELEBOT_SAFE_FREE (chat -> photo );
16051602
1606- for (size_t index = 0 ; index < chat -> count_active_usernames ; index ++ )
1603+ for (size_t index = 0 ; index < chat -> count_active_usernames ; index ++ )
16071604 TELEBOT_SAFE_FREE (chat -> active_usernames [index ]);
16081605 TELEBOT_SAFE_FREE (chat -> active_usernames );
16091606 chat -> count_active_usernames = 0 ;
0 commit comments