From bf0ddf5880de6677cc7ad69f040651b256afd70e Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Tue, 22 Feb 2011 16:20:24 -0500 Subject: Move away from id/type pair in favor of TplEntity In the first rework step, TplEventSearchType was introduced with wrong assomption. This item was merging entity type and event type together. To make thing simple, this patch replace the pair with a TplEntity object that contain all the required information about the Entity. This enable for more complete logs in the future and fix bugs where get_entities() won't return chatrooms. --- telepathy-logger/text-channel.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'telepathy-logger/text-channel.c') diff --git a/telepathy-logger/text-channel.c b/telepathy-logger/text-channel.c index 4252912..28abfe2 100644 --- a/telepathy-logger/text-channel.c +++ b/telepathy-logger/text-channel.c @@ -1120,7 +1120,6 @@ on_sent_signal_cb (TpChannel *proxy, "log-id", log_id, "receiver", receiver, "sender", sender, - "target-id", tpl_entity_get_identifier (receiver), "timestamp", timestamp, /* TplTextEvent */ "message-type", type, @@ -1166,21 +1165,19 @@ keepon_on_receiving_signal (TplTextChannel *tpl_text, TplLogManager *logmanager; TplEntity *sender; TplEntity *receiver; - const gchar *target_id; sender = _tpl_entity_new_from_tp_contact (remote, TPL_ENTITY_CONTACT); if (_tpl_text_channel_is_chatroom (tpl_text)) { - target_id = _tpl_text_channel_get_chatroom_id (tpl_text); - receiver = _tpl_entity_new_from_room_id (target_id); + const gchar *receiver_id = _tpl_text_channel_get_chatroom_id (tpl_text); + receiver = _tpl_entity_new_from_room_id (receiver_id); } else { TpContact *me; me = _tpl_text_channel_get_my_contact (tpl_text); receiver = _tpl_entity_new_from_tp_contact (me, TPL_ENTITY_SELF); - target_id = tpl_entity_get_identifier (sender); } /* Initialize TplTextEvent */ @@ -1191,7 +1188,6 @@ keepon_on_receiving_signal (TplTextChannel *tpl_text, "log-id", data->log_id, "receiver", receiver, "sender", sender, - "target-id", target_id, "timestamp", data->timestamp, /* TplTextEvent */ "message-type", data->type, -- cgit v1.2.1