minor additions
This commit is contained in:
parent
9e3295b19c
commit
cac82821e8
@ -545,8 +545,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) {
|
||||
Tox_Err_Group_Send_Message err = TOX_ERR_GROUP_SEND_MESSAGE_OK;
|
||||
uint32_t message_id = 0;
|
||||
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) {
|
||||
const bool res = tox_group_send_message(_tox, group_number, type, reinterpret_cast<const uint8_t*>(message.data()), message.size(), &message_id, &err);
|
||||
if (res) {
|
||||
return {message_id, err};
|
||||
} else {
|
||||
return {std::nullopt, err};
|
||||
|
@ -40,8 +40,14 @@ bool ToxEventLogger::onToxEvent(const Tox_Event_File_Chunk_Request* e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ToxEventLogger::onToxEvent(const Tox_Event_File_Recv*) {
|
||||
_out << "TOX_EVENT: " << tox_event_to_string(TOX_EVENT_FILE_RECV) << "\n";
|
||||
bool ToxEventLogger::onToxEvent(const Tox_Event_File_Recv* e) {
|
||||
_out << "TOX_EVENT: " << tox_event_to_string(TOX_EVENT_FILE_RECV)
|
||||
<< " frd:" << tox_event_file_recv_get_friend_number(e)
|
||||
<< " fnb:" << tox_event_file_recv_get_file_number(e)
|
||||
<< " fnm:" << std::string_view{reinterpret_cast<const char*>(tox_event_file_recv_get_filename(e)), tox_event_file_recv_get_filename_length(e)}
|
||||
<< " sze:" << tox_event_file_recv_get_file_size(e)
|
||||
<< " knd:" << tox_event_file_recv_get_kind(e)
|
||||
<< "\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user