summaryrefslogtreecommitdiff
path: root/telepathy-logger/text-channel.c
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2011-02-22 16:20:24 -0500
committerNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2011-02-22 16:20:24 -0500
commitbf0ddf5880de6677cc7ad69f040651b256afd70e (patch)
tree9ebb9e3bdeb5fd614bc4eb01bf8c4f876df90c89 /telepathy-logger/text-channel.c
parentce34b27629ad00ebc5bf0e7ad7ec1df43e190f48 (diff)
downloadtelepathy-logger-bf0ddf5880de6677cc7ad69f040651b256afd70e.tar.gz
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.
Diffstat (limited to 'telepathy-logger/text-channel.c')
-rw-r--r--telepathy-logger/text-channel.c8
1 files changed, 2 insertions, 6 deletions
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,