Skip to content

Commit fdc2864

Browse files
committed
feat(ffi): Return chat id as data2 for OutgoingCallAccepted, CallEnded events
1 parent 9cb2077 commit fdc2864

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

deltachat-ffi/deltachat.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6661,6 +6661,7 @@ void dc_event_unref(dc_event_t* event);
66616661
* UI usually only takes action in case call UI was opened before, otherwise the event should be ignored.
66626662
*
66636663
* @param data1 (int) msg_id ID of the message referring to the call
6664+
* @param data2 (int) chat_id ID of the chat which the message belongs to
66646665
* @param data2 (char*) accept_call_info, text passed to dc_accept_incoming_call()
66656666
*/
66666667
#define DC_EVENT_OUTGOING_CALL_ACCEPTED 2570
@@ -6672,6 +6673,7 @@ void dc_event_unref(dc_event_t* event);
66726673
* UI usually only takes action in case call UI was opened before, otherwise the event should be ignored.
66736674
*
66746675
* @param data1 (int) msg_id ID of the message referring to the call
6676+
* @param data2 (int) chat_id ID of the chat which the message belongs to
66756677
*/
66766678
#define DC_EVENT_CALL_ENDED 2580
66776679

deltachat-ffi/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -679,11 +679,11 @@ pub unsafe extern "C" fn dc_event_get_data2_int(event: *mut dc_event_t) -> libc:
679679
| EventType::ChatModified(_)
680680
| EventType::ChatDeleted { .. }
681681
| EventType::WebxdcRealtimeAdvertisementReceived { .. }
682-
| EventType::OutgoingCallAccepted { .. }
683-
| EventType::CallEnded { .. }
684682
| EventType::EventChannelOverflow { .. }
685683
| EventType::TransportsModified => 0,
686-
EventType::CallMissed { chat_id, .. } => chat_id.to_u32() as libc::c_int,
684+
EventType::OutgoingCallAccepted { chat_id, .. }
685+
| EventType::CallEnded { chat_id, .. }
686+
| EventType::CallMissed { chat_id, .. } => chat_id.to_u32() as libc::c_int,
687687
EventType::MsgsChanged { msg_id, .. }
688688
| EventType::ReactionsChanged { msg_id, .. }
689689
| EventType::IncomingReaction { msg_id, .. }

0 commit comments

Comments
 (0)