From 755d626b3b010d2b2aaecb968c8faf579df92790 Mon Sep 17 00:00:00 2001 From: Danielle Madeley Date: Thu, 21 Apr 2011 12:35:39 +1000 Subject: Port empathy_tp_chat_get_self_contact() from master --- libempathy/empathy-tp-chat.c | 10 ++++++++++ libempathy/empathy-tp-chat.h | 1 + 2 files changed, 11 insertions(+) (limited to 'libempathy') diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c index 17ddf2701..1d5b43cb6 100644 --- a/libempathy/empathy-tp-chat.c +++ b/libempathy/empathy-tp-chat.c @@ -1972,3 +1972,13 @@ empathy_tp_chat_is_sms_channel (EmpathyTpChat *self) return priv->sms_channel; } + +EmpathyContact * +empathy_tp_chat_get_self_contact (EmpathyTpChat *self) +{ + EmpathyTpChatPriv *priv = GET_PRIV (self); + + g_return_val_if_fail (EMPATHY_IS_TP_CHAT (self), NULL); + + return priv->user; +} diff --git a/libempathy/empathy-tp-chat.h b/libempathy/empathy-tp-chat.h index a71c81c7e..5559bdd4b 100644 --- a/libempathy/empathy-tp-chat.h +++ b/libempathy/empathy-tp-chat.h @@ -64,6 +64,7 @@ EmpathyTpChat *empathy_tp_chat_new (TpAccount *account, TpChannel *channel); const gchar * empathy_tp_chat_get_id (EmpathyTpChat *chat); EmpathyContact *empathy_tp_chat_get_remote_contact (EmpathyTpChat *chat); +EmpathyContact *empathy_tp_chat_get_self_contact (EmpathyTpChat *chat); TpChannel * empathy_tp_chat_get_channel (EmpathyTpChat *chat); TpAccount * empathy_tp_chat_get_account (EmpathyTpChat *chat); TpConnection * empathy_tp_chat_get_connection (EmpathyTpChat *chat); -- cgit v1.2.1