aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-message.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy/empathy-message.c')
-rw-r--r--libempathy/empathy-message.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/libempathy/empathy-message.c b/libempathy/empathy-message.c
index d68309bb3..06913dc0c 100644
--- a/libempathy/empathy-message.c
+++ b/libempathy/empathy-message.c
@@ -341,7 +341,8 @@ empathy_message_from_tpl_log_event (TplEvent *logevent)
TpAccount *account = NULL;
TplEntity *receiver = NULL;
TplEntity *sender = NULL;
- gchar *body= NULL;
+ gchar *body = NULL;
+ const gchar *token = NULL, *supersedes = NULL;
EmpathyContact *contact;
TpChannelTextMessageType type = TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL;
@@ -364,14 +365,18 @@ empathy_message_from_tpl_log_event (TplEvent *logevent)
g_object_unref (acc_man);
if (TPL_IS_TEXT_EVENT (logevent)) {
- body = g_strdup (tpl_text_event_get_message (
- TPL_TEXT_EVENT (logevent)));
+ TplTextEvent *textevent = TPL_TEXT_EVENT (logevent);
+
+ body = g_strdup (tpl_text_event_get_message (textevent));
type = tpl_text_event_get_message_type (TPL_TEXT_EVENT (logevent));
+ token = tpl_text_event_get_message_token (textevent);
+ supersedes = tpl_text_event_get_supersedes_token (textevent);
}
#ifdef HAVE_CALL_LOGS
else if (TPL_IS_CALL_EVENT (logevent)) {
TplCallEvent *call = TPL_CALL_EVENT (logevent);
+
if (tpl_call_event_get_end_reason (call) == TPL_CALL_END_REASON_NO_ANSWER)
body = g_strdup_printf (_("Missed call from %s"),
tpl_entity_get_alias (tpl_event_get_sender (logevent)));
@@ -393,6 +398,8 @@ empathy_message_from_tpl_log_event (TplEvent *logevent)
retval = g_object_new (EMPATHY_TYPE_MESSAGE,
"type", type,
+ "token", token,
+ "supersedes", supersedes,
"body", body,
"is-backlog", TRUE,
"timestamp", tpl_event_get_timestamp (logevent),