aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-log-manager.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/libempathy/empathy-log-manager.c b/libempathy/empathy-log-manager.c
index 73ddf65ec..30c31f92a 100644
--- a/libempathy/empathy-log-manager.c
+++ b/libempathy/empathy-log-manager.c
@@ -280,9 +280,19 @@ empathy_log_manager_get_last_messages (EmpathyLogManager *manager,
l = g_list_last (dates);
if (l)
- messages = empathy_log_manager_get_messages_for_date (manager, account,
+ {
+ messages = empathy_log_manager_get_messages_for_date (manager, account,
chat_id, chatroom, l->data);
+ /* The latest date will always be today as messages are logged immediately. */
+ l = g_list_previous (l);
+ if (l)
+ {
+ messages = g_list_concat (messages, empathy_log_manager_get_messages_for_date (
+ manager, account, chat_id, chatroom, l->data));
+ }
+ }
+
g_list_foreach (dates, (GFunc) g_free, NULL);
g_list_free (dates);