update to new group send message sig
This commit is contained in:
parent
08b3d69c15
commit
80140ae9b6
@ -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};
|
||||||
|
Loading…
Reference in New Issue
Block a user