Browse files

Pubsub: fix namespace for purge_items_from

Received from lfcipriani on
Hi Lucas,

I found a simple but annoying bug on pubsub support of xmpp4r, I think
isn't worthy to clone and send a push request to you. So, here it is:

On method purge_items_from of service_helper.rb

      def purge_items_from(node)
        iq = basic_pubsub_query(:set)
        purge ='purge')
        purge.attributes['node'] = node

The call to method basic_pubsub_query(:set) should be
basic_pubsub_query(:set, true), because the namespace of this command is

That's it. Thanks for this really useful gem.
  • Loading branch information...
lnussbaum committed Sep 16, 2009
1 parent a506a85 commit 37466c529b7ecf79e1a395c027d9b41335621737
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/xmpp4r/pubsub/helper/servicehelper.rb
@@ -218,7 +218,7 @@ def delete_item_from(node, item_id)
# node:: [String]
# return:: true
def purge_items_from(node)
- iq = basic_pubsub_query(:set)
+ iq = basic_pubsub_query(:set, true)
purge ='purge')
purge.attributes['node'] = node

0 comments on commit 37466c5

Please sign in to comment.