telepathy-gabble: roster: obey blocked-ness in gets_presence_from_us

Will Thompson wjt at kemper.freedesktop.org
Thu Dec 6 10:37:22 PST 2012


Module: telepathy-gabble
Branch: master
Commit: 4af3fe1066bfd36894fb10f80148269ed94d6c11
URL:    http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=4af3fe1066bfd36894fb10f80148269ed94d6c11

Author: Will Thompson <will.thompson at collabora.co.uk>
Date:   Wed Oct 31 23:04:22 2012 +0000

roster: obey blocked-ness in gets_presence_from_us

This should be irrelevant because blocked contacts shouldn't be able to
send us anything which would cause us to send back a reply (eg.
jabber:iq:last would be blocked by our server), but just to reassure the
reader.

---

 src/roster.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/roster.c b/src/roster.c
index 64360ce..d2cc4da 100644
--- a/src/roster.c
+++ b/src/roster.c
@@ -3601,6 +3601,9 @@ gabble_roster_handle_gets_presence_from_us (GabbleRoster *self,
   if (item == NULL)
     return FALSE;
 
+  if (item->blocked)
+    return FALSE;
+
   return (item->subscription == GABBLE_ROSTER_SUBSCRIPTION_FROM ||
       item->subscription == GABBLE_ROSTER_SUBSCRIPTION_BOTH);
 }



More information about the telepathy-commits mailing list