feat(ffi): Return chat id as data2 for OutgoingCallAccepted, CallEnded events

This commit is contained in:
iequidoo
2026-04-10 09:59:45 -03:00
parent 9cb2077c94
commit fdc2864df4
2 changed files with 5 additions and 3 deletions

View File

@@ -6661,6 +6661,7 @@ void dc_event_unref(dc_event_t* event);
* UI usually only takes action in case call UI was opened before, otherwise the event should be ignored.
*
* @param data1 (int) msg_id ID of the message referring to the call
* @param data2 (int) chat_id ID of the chat which the message belongs to
* @param data2 (char*) accept_call_info, text passed to dc_accept_incoming_call()
*/
#define DC_EVENT_OUTGOING_CALL_ACCEPTED 2570
@@ -6672,6 +6673,7 @@ void dc_event_unref(dc_event_t* event);
* UI usually only takes action in case call UI was opened before, otherwise the event should be ignored.
*
* @param data1 (int) msg_id ID of the message referring to the call
* @param data2 (int) chat_id ID of the chat which the message belongs to
*/
#define DC_EVENT_CALL_ENDED 2580

View File

@@ -679,11 +679,11 @@ pub unsafe extern "C" fn dc_event_get_data2_int(event: *mut dc_event_t) -> libc:
| EventType::ChatModified(_)
| EventType::ChatDeleted { .. }
| EventType::WebxdcRealtimeAdvertisementReceived { .. }
| EventType::OutgoingCallAccepted { .. }
| EventType::CallEnded { .. }
| EventType::EventChannelOverflow { .. }
| EventType::TransportsModified => 0,
EventType::CallMissed { chat_id, .. } => chat_id.to_u32() as libc::c_int,
EventType::OutgoingCallAccepted { chat_id, .. }
| EventType::CallEnded { chat_id, .. }
| EventType::CallMissed { chat_id, .. } => chat_id.to_u32() as libc::c_int,
EventType::MsgsChanged { msg_id, .. }
| EventType::ReactionsChanged { msg_id, .. }
| EventType::IncomingReaction { msg_id, .. }