Small trick to display received file transfer message url in chat

This commit is contained in:
Sylvain Berfini 2016-04-14 15:06:24 +02:00
parent 62756b7908
commit e7022216c6

View file

@ -180,6 +180,11 @@ void linphone_gtk_push_text(GtkWidget *w, const LinphoneAddress *from,
g_object_set_data(G_OBJECT(w),"from_message",g_strdup(from_str));
}
ms_free(from_str);
if (!message) {
const char *external_body_url = linphone_chat_message_get_external_body_url(msg);
if (external_body_url) message = external_body_url;
}
// Inserts message body and tags URIs as hypertext links
if(message) {
@ -611,6 +616,8 @@ void linphone_gtk_text_received ( LinphoneCore *lc, LinphoneChatRoom *room,
/*GtkNotebook *notebook= ( GtkNotebook * ) linphone_gtk_get_widget ( main_window,"viewswitch" );*/
const LinphoneAddress *from= linphone_chat_message_get_from ( msg );
linphone_core_take_preview_snapshot(lc, "/home/viish/capture.jpg");
w= ( GtkWidget* ) g_object_get_data ( G_OBJECT ( friendlist ),"chatview" );
if ( w!=NULL ) {
/* Chat window opened */