diff options
Diffstat (limited to 'src/event.c')
-rw-r--r-- | src/event.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/event.c b/src/event.c index f081e2f..9269b9b 100644 --- a/src/event.c +++ b/src/event.c | |||
@@ -427,6 +427,10 @@ event_receive_message(MESSENGER_Application *app, | |||
427 | return; | 427 | return; |
428 | 428 | ||
429 | const int sent = GNUNET_CHAT_message_is_sent(msg); | 429 | const int sent = GNUNET_CHAT_message_is_sent(msg); |
430 | const gchar *text = GNUNET_CHAT_message_get_text(msg); | ||
431 | |||
432 | if ((text) && (!(*text))) | ||
433 | goto skip_message; | ||
430 | 434 | ||
431 | const UI_MESSAGE_Type type = ( | 435 | const UI_MESSAGE_Type type = ( |
432 | GNUNET_YES == sent? UI_MESSAGE_SENT : UI_MESSAGE_DEFAULT | 436 | GNUNET_YES == sent? UI_MESSAGE_SENT : UI_MESSAGE_DEFAULT |
@@ -455,7 +459,6 @@ event_receive_message(MESSENGER_Application *app, | |||
455 | msg | 459 | msg |
456 | ); | 460 | ); |
457 | 461 | ||
458 | const gchar *text = GNUNET_CHAT_message_get_text(msg); | ||
459 | const gchar *time = GNUNET_STRINGS_absolute_time_to_string(timestamp); | 462 | const gchar *time = GNUNET_STRINGS_absolute_time_to_string(timestamp); |
460 | 463 | ||
461 | if ((!ui_messenger_is_context_active(&(app->ui.messenger), context)) && | 464 | if ((!ui_messenger_is_context_active(&(app->ui.messenger), context)) && |
@@ -472,6 +475,8 @@ event_receive_message(MESSENGER_Application *app, | |||
472 | gtk_label_set_text(message->timestamp_label, time? time : ""); | 475 | gtk_label_set_text(message->timestamp_label, time? time : ""); |
473 | 476 | ||
474 | ui_chat_add_message(handle->chat, app, message); | 477 | ui_chat_add_message(handle->chat, app, message); |
478 | |||
479 | skip_message: | ||
475 | ui_chat_entry_update(handle, app, context); | 480 | ui_chat_entry_update(handle, app, context); |
476 | } | 481 | } |
477 | 482 | ||