update to new group send message sig

This commit is contained in:
Green Sky 2024-01-09 20:34:57 +01:00
parent 08b3d69c15
commit 80140ae9b6
No known key found for this signature in database

View File

@ -580,9 +580,8 @@ std::vector<uint32_t> ToxDefaultImpl::toxGroupGetList(void) {
std::tuple<std::optional<uint32_t>, Tox_Err_Group_Send_Message> ToxDefaultImpl::toxGroupSendMessage(uint32_t group_number, Tox_Message_Type type, std::string_view message) { std::tuple<std::optional<uint32_t>, Tox_Err_Group_Send_Message> ToxDefaultImpl::toxGroupSendMessage(uint32_t group_number, Tox_Message_Type type, std::string_view message) {
Tox_Err_Group_Send_Message err = TOX_ERR_GROUP_SEND_MESSAGE_OK; Tox_Err_Group_Send_Message err = TOX_ERR_GROUP_SEND_MESSAGE_OK;
uint32_t message_id = 0; uint32_t message_id = tox_group_send_message(_tox, group_number, type, reinterpret_cast<const uint8_t*>(message.data()), message.size(), &err);
const bool res = tox_group_send_message(_tox, group_number, type, reinterpret_cast<const uint8_t*>(message.data()), message.size(), &message_id, &err); if (err == TOX_ERR_GROUP_SEND_MESSAGE_OK) {
if (res) {
return {message_id, err}; return {message_id, err};
} else { } else {
return {std::nullopt, err}; return {std::nullopt, err};