diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-05-07 18:02:06 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-05-07 18:02:06 +0100 |
commit | bab2be17b5c6af95b7a990038a1978454829b511 (patch) | |
tree | 68088d2de045b3508df65ea2d73edcc73f78d1a7 | |
parent | eb516a9909fe271e40b91df9d7f9cc12a83c2422 (diff) |
Use non-deprecated TpMessage APIsdeprecations
-rw-r--r-- | src/im-channel.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/im-channel.c b/src/im-channel.c index 9dbc43a..68efacb 100644 --- a/src/im-channel.c +++ b/src/im-channel.c @@ -757,8 +757,8 @@ _make_message (HazeIMChannel *self, PurpleMessageFlags flags, time_t mtime) { - TpMessage *message = tp_message_new ((TpBaseConnection *) self->priv->conn, - 2, 2); + TpBaseConnection *base_conn = (TpBaseConnection *) self->priv->conn; + TpMessage *message = tp_cm_message_new (base_conn, 2); TpChannelTextMessageType type = TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL; time_t now = time (NULL); @@ -767,8 +767,7 @@ _make_message (HazeIMChannel *self, else if (purple_message_meify (text_plain, -1)) type = TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION; - tp_message_set_handle (message, 0, "message-sender", TP_HANDLE_TYPE_CONTACT, - self->priv->handle); + tp_cm_message_set_sender (message, self->priv->handle); tp_message_set_uint32 (message, 0, "message-type", type); /* FIXME: the second half of this test shouldn't be necessary but prpl-jabber @@ -790,11 +789,11 @@ static TpMessage * _make_delivery_report (HazeIMChannel *self, char *text_plain) { - TpMessage *report = tp_message_new ((TpBaseConnection *) self->priv->conn, 2, - 2); + TpBaseConnection *base_conn = (TpBaseConnection *) self->priv->conn; + TpMessage *report = tp_cm_message_new (base_conn, 2); /* "MUST be the intended recipient of the original message" */ - tp_message_set_uint32 (report, 0, "message-sender", self->priv->handle); + tp_cm_message_set_sender (report, self->priv->handle); tp_message_set_uint32 (report, 0, "message-type", TP_CHANNEL_TEXT_MESSAGE_TYPE_DELIVERY_REPORT); /* FIXME: we don't know that the failure is temporary */ |