mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-28 08:39:20 +00:00
Fix for chat message importing
This commit is contained in:
parent
42261f4900
commit
440fabd247
3 changed files with 13 additions and 3 deletions
|
|
@ -274,9 +274,16 @@ LinphoneChatMessage* linphone_chat_room_create_message(LinphoneChatRoom *cr, con
|
|||
* Create a message attached to a dedicated chat room;
|
||||
* @param cr the chat room.
|
||||
* @param message text message, NULL if absent.
|
||||
* @param external_body_url the URL given in external body or NULL.
|
||||
* @param state the LinphoneChatMessage.State of the message.
|
||||
* @param time the time_t at which the message has been received/sent.
|
||||
* @param is_read TRUE if the message should be flagged as read, FALSE otherwise.
|
||||
* @param is_incoming TRUE if the message has been received, FALSE otherwise.
|
||||
* @return a new #LinphoneChatMessage
|
||||
*/
|
||||
LinphoneChatMessage* linphone_chat_room_create_message_2(LinphoneChatRoom *cr, const char* message, const char* external_body_url, LinphoneChatMessageState state, time_t time, bool_t is_read, bool_t is_incoming) {
|
||||
LinphoneChatMessage* linphone_chat_room_create_message_2(
|
||||
LinphoneChatRoom *cr, const char* message, const char* external_body_url,
|
||||
LinphoneChatMessageState state, time_t time, bool_t is_read, bool_t is_incoming) {
|
||||
LinphoneCore *lc=linphone_chat_room_get_lc(cr);
|
||||
|
||||
LinphoneChatMessage* msg = ms_new0(LinphoneChatMessage,1);
|
||||
|
|
|
|||
|
|
@ -2116,7 +2116,9 @@ extern "C" jlong Java_org_linphone_core_LinphoneChatRoomImpl_createLinphoneChatM
|
|||
const char* message = jmessage?env->GetStringUTFChars(jmessage, NULL):NULL;
|
||||
const char* url = jurl?env->GetStringUTFChars(jurl, NULL):NULL;
|
||||
|
||||
LinphoneChatMessage *chatMessage = linphone_chat_room_create_message_2((LinphoneChatRoom *)ptr, message, url, (LinphoneChatMessageState)state, (time_t)time, read, incoming);
|
||||
LinphoneChatMessage *chatMessage = linphone_chat_room_create_message_2(
|
||||
(LinphoneChatRoom *)ptr, message, url, (LinphoneChatMessageState)state,
|
||||
(time_t)time, read, incoming);
|
||||
|
||||
if (jmessage != NULL)
|
||||
env->ReleaseStringUTFChars(jmessage, message);
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ class LinphoneChatRoomImpl implements LinphoneChatRoom {
|
|||
public LinphoneChatMessage createLinphoneChatMessage(String message,
|
||||
String url, State state, long timestamp, boolean isRead,
|
||||
boolean isIncoming) {
|
||||
return new LinphoneChatMessageImpl(createLinphoneChatMessage2(nativePtr, message, url, state.value(), timestamp / 1000, isRead, isIncoming));
|
||||
return new LinphoneChatMessageImpl(createLinphoneChatMessage2(
|
||||
nativePtr, message, url, state.value(), timestamp / 1000, isRead, isIncoming));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue