mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-06 03:49:58 +02:00
add resendMsgs() api
This commit is contained in:
parent
fb60d2965a
commit
f047f1382e
2 changed files with 11 additions and 0 deletions
|
@ -711,6 +711,16 @@ JNIEXPORT void Java_com_b44t_messenger_DcContext_forwardMsgs(JNIEnv *env, jobjec
|
|||
}
|
||||
|
||||
|
||||
JNIEXPORT jboolean Java_com_b44t_messenger_DcContext_resendMsgs(JNIEnv *env, jobject obj, jintArray msg_ids)
|
||||
{
|
||||
int msg_ids_cnt = 0;
|
||||
uint32_t* msg_ids_ptr = jintArray2uint32Pointer(env, msg_ids, &msg_ids_cnt);
|
||||
jboolean ret = dc_resend_msgs(get_dc_context(env, obj), msg_ids_ptr, msg_ids_cnt) != 0;
|
||||
free(msg_ids_ptr);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
JNIEXPORT jint Java_com_b44t_messenger_DcContext_prepareMsg(JNIEnv *env, jobject obj, jint chat_id, jobject msg)
|
||||
{
|
||||
return dc_prepare_msg(get_dc_context(env, obj), chat_id, get_dc_msg(env, msg));
|
||||
|
|
|
@ -194,6 +194,7 @@ public class DcContext {
|
|||
public native int estimateDeletionCount(boolean from_server, long seconds);
|
||||
public native void deleteMsgs (int msg_ids[]);
|
||||
public native void forwardMsgs (int msg_ids[], int chat_id);
|
||||
public native boolean resendMsgs (int msg_ids[]);
|
||||
public native int prepareMsg (int chat_id, DcMsg msg);
|
||||
public native int sendMsg (int chat_id, DcMsg msg);
|
||||
public native int sendTextMsg (int chat_id, String text);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue