[next] telepathy-gabble: muc-channel: remove unread assignments

George Kiagiadakis gkiagia at kemper.freedesktop.org
Fri Dec 2 16:19:28 UTC 2016


Module: telepathy-gabble
Branch: next
Commit: 2baab46892efbb05d9f6083ca5b7709919140751
URL:    http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=2baab46892efbb05d9f6083ca5b7709919140751

Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date:   Tue Jun  3 16:21:17 2014 +0200

muc-channel: remove unread assignments

---

 src/muc-channel.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/muc-channel.c b/src/muc-channel.c
index 2df7b31..5c0260d 100644
--- a/src/muc-channel.c
+++ b/src/muc-channel.c
@@ -2769,12 +2769,13 @@ handle_message (WockyMuc *muc,
   gboolean from_member = (who != NULL);
 
   TpChannelTextMessageType msg_type;
-  TpHandleRepoIface *repo;
   TpHandleType handle_type;
   TpHandle from;
 
   if (from_member)
     {
+      TpHandleRepoIface *repo;
+
       handle_type = TP_HANDLE_TYPE_CONTACT;
       repo = tp_base_connection_get_handles (conn, handle_type);
       from = tp_handle_ensure (repo, who->from,
@@ -2789,7 +2790,6 @@ handle_message (WockyMuc *muc,
   else /* directly from MUC itself */
     {
       handle_type = TP_HANDLE_TYPE_ROOM;
-      repo = tp_base_connection_get_handles (conn, handle_type);
       from = tp_base_channel_get_target_handle (base);
     }
 
@@ -2858,13 +2858,14 @@ handle_errmsg (WockyMuc *muc,
   TpBaseConnection *conn = tp_base_channel_get_connection (base);
   gboolean from_member = (who != NULL);
   TpDeliveryStatus ds = TP_DELIVERY_STATUS_DELIVERED;
-  TpHandleRepoIface *repo = NULL;
   TpHandleType handle_type;
   TpHandle from = 0;
   const gchar *subject;
 
   if (from_member)
     {
+      TpHandleRepoIface *repo;
+
       handle_type = TP_HANDLE_TYPE_CONTACT;
       repo = tp_base_connection_get_handles (conn, handle_type);
       from = tp_handle_ensure (repo, who->from,
@@ -2879,7 +2880,6 @@ handle_errmsg (WockyMuc *muc,
   else /* directly from MUC itself */
     {
       handle_type = TP_HANDLE_TYPE_ROOM;
-      repo = tp_base_connection_get_handles (conn, handle_type);
       from = tp_base_channel_get_target_handle (base);
     }
 



More information about the telepathy-commits mailing list