Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(EXEC_PREFIX "${PREFIX}/bin")
SET(INCLUDEDIR "${PREFIX}/include/${PROJECT_NAME}")
SET(LIBDIR "${PREFIX}/lib")
SET(VERSION 4.7.0)
SET(VERSION 4.7.1)

SET(CMAKE_MACOSX_RPATH 1)

Expand All @@ -16,7 +16,7 @@ SET(SRCS
src/telebot.c
)

ADD_DEFINITIONS("-DDEBUG=1")
ADD_DEFINITIONS("-DDEBUG=0")
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
SET(DEPENDENTS "libcurl json-c")
INCLUDE(FindPkgConfig)
Expand All @@ -25,7 +25,7 @@ pkg_check_modules(PKGS REQUIRED ${DEPENDENTS})
FOREACH(flag ${PKGS_CFLAGS})
SET(EXTRA_LIB_CFLAGS "${EXTRA_LIB_CFLAGS} ${flag}")
ENDFOREACH(flag)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_LIB_CFLAGS} -Werror -Wall -Wno-unused-function" )
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_LIB_CFLAGS} -Werror -Wall -Wno-unused-function -O2" )

# libtelebot
ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
Expand Down
21 changes: 21 additions & 0 deletions include/telebot-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,27 @@ telebot_error_e telebot_core_send_video_note(telebot_core_handler_t *core_h,
const char *thumb, bool disable_notification, int reply_to_message_id,
const char *reply_markup, telebot_core_response_t *response);

/**
* @brief Send a group of photos as an album.
*
* @param[in] core_h The telebot core handler created with #telebot_core_create().
* @param[in] chat_id Unique identifier for the target chat or username of the target channel.
* @param[in] media_paths Array of file paths to photos to send.
* @param[in] count Number of photos in the array (2–10).
* @param[in] disable_notification Sends the message silently. Users will receive a notification with no sound.
* @param[in] reply_to_message_id If the message is a reply, ID of the original message.
* @param[out] response Response data that contains the sent messages on success. It MUST be freed with #telebot_core_put_response().
* @return on Success, TELEBOT_ERROR_NONE is returned, otherwise a negative error value.
*/
telebot_error_e telebot_core_send_media_group(
telebot_core_handler_t *core_h,
long long int chat_id,
char *media_paths[],
int count,
bool disable_notification,
int reply_to_message_id,
telebot_core_response_t *response);

/**
* @brief Send point on the map.
* @param[in] core_h The telebot core handler created with #telebot_core_create().
Expand Down
19 changes: 19 additions & 0 deletions include/telebot-methods.h
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,25 @@ telebot_error_e telebot_send_video_note(telebot_handler_t handle, long long int
char *video_note, bool is_file, int duration, int length, const char *thumb,
bool disable_notification, int reply_to_message_id, const char *reply_markup);

/**
* @brief Send a group of photos as an album.
*
* @param[in] handle The telebot handler created with #telebot_create().
* @param[in] chat_id Unique identifier for the target chat or username of the target channel.
* @param[in] media_paths Array of file paths to photos to send.
* @param[in] count Number of photos in the array (2–10).
* @param[in] disable_notification Sends the message silently.
* @param[in] reply_to_message_id If the message is a reply, ID of the original message.
* @return on Success, TELEBOT_ERROR_NONE is returned, otherwise a negative error value.
*/
telebot_error_e telebot_send_media_group(
telebot_handler_t handle,
long long int chat_id,
char *media_paths[],
int count,
bool disable_notification,
int reply_to_message_id);

/**
* @brief Send point on the map.
* @param[in] handle The telebot handler created with #telebot_create().
Expand Down
2 changes: 1 addition & 1 deletion include/telebot-types.h
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@ typedef struct telebot_update {
* A user changed their answer in a non-anonymous poll. Bots receive
* new votes only in polls that were sent by the bot itself.
*/
telebot_poll_answer_t poll_anser;
telebot_poll_answer_t poll_answer;
};
} telebot_update_t;

Expand Down
Loading