<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -610,37 +610,30 @@ do_command(To, From, _RawCommand, {&quot;unfollow&quot;, [JidStr]}) -&gt;
       end);
 do_command(_To, From, _RawCommand, {&quot;following&quot;, []}) -&gt;
     case lookup_following(jid_to_urn(From)) of
-	{ok, []} -&gt;
+	[] -&gt;
 	    {ok, &quot;You are not following anyone at the moment.&quot;};
-	{ok, PrettyNames} -&gt;
-	    {ok, &quot;You are currently following ~s.&quot;, [and_join(PrettyNames)]};
-	{error, not_found} -&gt;
-	    {error, &quot;That's odd. I couldn't retrieve the list of people you're following!&quot;}
+	PrettyNames -&gt;
+	    {ok, &quot;You are currently following ~s.&quot;, [and_join(PrettyNames)]}
     end;
 do_command(_To, _From, _RawCommand, {&quot;following&quot;, [JidStr]}) -&gt;
     case lookup_following(string_to_urn(JidStr)) of
-	{ok, []} -&gt;
+	[] -&gt;
 	    {ok, &quot;~s is not following anyone at the moment.&quot;, [JidStr]};
-	{ok, PrettyNames} -&gt;
-	    {ok, &quot;~s is currently following ~s.&quot;, [JidStr, and_join(PrettyNames)]};
-	{error, not_found} -&gt;
-	    {error,
-	     &quot;I can't retrieve the list of people ~s is following. &quot; ++
-	     &quot;Perhaps they are not a registered user?&quot;,
-	     [JidStr]}
+	PrettyNames -&gt;
+	    {ok, &quot;~s is currently following ~s.&quot;, [JidStr, and_join(PrettyNames)]}
     end;
 do_command(_To, From, _RawCommand, {&quot;followers&quot;, []}) -&gt;
     case lookup_followers(jid_to_urn(From)) of
-	{ok, []} -&gt;
+	[] -&gt;
 	    {ok, &quot;No-one is currently following you.&quot;};
-	{ok, PrettyNames} -&gt;
+	PrettyNames -&gt;
 	    {ok, &quot;You are currently being followed by ~s.&quot;, [and_join(PrettyNames)]}
     end;
-do_command(_To, From, _RawCommand, {&quot;followers&quot;, [JidStr]}) -&gt;
+do_command(_To, _From, _RawCommand, {&quot;followers&quot;, [JidStr]}) -&gt;
     case lookup_followers(string_to_urn(JidStr)) of
-	{ok, []} -&gt;
+	[] -&gt;
 	    {ok, &quot;No-one is currently following ~s.&quot;, [JidStr]};
-	{ok, PrettyNames} -&gt;
+	PrettyNames -&gt;
 	    {ok, &quot;~s is currently being followed by ~s.&quot;, [JidStr, and_join(PrettyNames)]}
     end;
 do_command(To, From, _RawCommand, {&quot;invite&quot;, [JidStr]}) -&gt;
@@ -722,19 +715,9 @@ use_user_supplied_jid(BotJid, FromJid, JidStr, F) -&gt;
     end.
 
 lookup_following(Urn) -&gt;
-    case rabbit_amqqueue:lookup(?QNAME(Urn)) of
-	{ok, #amqqueue{binding_specs = Specs}} -&gt;
-	    XNames = [XName || #binding_spec{exchange_name = #resource{name = XName}} &lt;- Specs],
-	    {ok, prettify_urn_jids(Urn, XNames)};
-	{error, not_found} -&gt;
-	    {error, not_found}
-    end.
+    prettify_urn_jids(Urn, [XName || {XName, _RoutingKey, _Arguments}
+					 &lt;- rabbit_exchange:list_queue_bindings(?QNAME(Urn))]).
 
 lookup_followers(Urn) -&gt;
-    {atomic, QNames} =
-	mnesia:transaction(
-	  fun () -&gt;
-		  [QName || {#resource{name = QName}, _, _}
-				&lt;- rabbit_exchange:list_exchange_bindings(?XNAME(Urn))]
-	  end),
-    {ok, prettify_urn_jids(Urn, QNames)}.
+    prettify_urn_jids(Urn, [QName || {QName, _RoutingKey, _Arguments}
+					 &lt;- rabbit_exchange:list_exchange_bindings(?XNAME(Urn))]).</diff>
      <filename>mod_rabbiter.erl</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>af2df6448ae3ae9d82637e47c190116e0c27821e</id>
    </parent>
  </parents>
  <author>
    <name>Tony Garnock-Jones</name>
    <email>tonyg@kcbbs.gen.nz</email>
  </author>
  <url>http://github.com/tonyg/rabbiter/commit/e99b8403474af6e6041ded10061bebe62977bf61</url>
  <id>e99b8403474af6e6041ded10061bebe62977bf61</id>
  <committed-date>2009-04-05T13:49:17-07:00</committed-date>
  <authored-date>2009-04-05T13:49:17-07:00</authored-date>
  <message>Updates to compile against rabbitmq 1.5.x</message>
  <tree>4c8567ab2458f98cc732f9d74456ce6883a79cbf</tree>
  <committer>
    <name>Tony Garnock-Jones</name>
    <email>tonyg@kcbbs.gen.nz</email>
  </committer>
</commit>
