mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Handle received group actions
This commit is contained in:
parent
ba9513e437
commit
91af4721c4
|
@ -263,6 +263,7 @@ void Core::start()
|
|||
tox_callback_group_invite(tox, onGroupInvite, this);
|
||||
tox_callback_group_message(tox, onGroupMessage, this);
|
||||
tox_callback_group_namelist_change(tox, onGroupNamelistChange, this);
|
||||
tox_callback_group_action(tox, onGroupAction, this);
|
||||
tox_callback_file_send_request(tox, onFileSendRequestCallback, this);
|
||||
tox_callback_file_control(tox, onFileControlCallback, this);
|
||||
tox_callback_file_data(tox, onFileDataCallback, this);
|
||||
|
@ -469,6 +470,12 @@ void Core::onAction(Tox*/* tox*/, int friendId, const uint8_t *cMessage, uint16_
|
|||
emit static_cast<Core*>(core)->friendMessageReceived(friendId, CString::toString(cMessage, cMessageSize), true);
|
||||
}
|
||||
|
||||
void Core::onGroupAction(Tox*, int groupnumber, int peernumber, const uint8_t *action, uint16_t length, void* _core)
|
||||
{
|
||||
Core* core = static_cast<Core*>(_core);
|
||||
emit core->groupMessageReceived(groupnumber, CString::toString(action, length), core->getGroupPeerName(groupnumber, peernumber));
|
||||
}
|
||||
|
||||
void Core::onGroupInvite(Tox*, int friendnumber, const uint8_t *group_public_key, uint16_t length,void *core)
|
||||
{
|
||||
qDebug() << QString("Core: Group invite by %1").arg(friendnumber);
|
||||
|
|
|
@ -197,6 +197,7 @@ private:
|
|||
static void onUserStatusChanged(Tox* tox, int friendId, uint8_t userstatus, void* core);
|
||||
static void onConnectionStatusChanged(Tox* tox, int friendId, uint8_t status, void* core);
|
||||
static void onAction(Tox* tox, int friendId, const uint8_t* cMessage, uint16_t cMessageSize, void* core);
|
||||
static void onGroupAction(Tox* tox, int groupnumber, int peernumber, const uint8_t * action, uint16_t length, void* core);
|
||||
static void onGroupInvite(Tox *tox, int friendnumber, const uint8_t *group_public_key, uint16_t length,void *userdata);
|
||||
static void onGroupMessage(Tox *tox, int groupnumber, int friendgroupnumber, const uint8_t * message, uint16_t length, void *userdata);
|
||||
static void onGroupNamelistChange(Tox *tox, int groupnumber, int peernumber, uint8_t change, void *userdata);
|
||||
|
|
Loading…
Reference in New Issue
Block a user