buddycloud / deprecated-buddycloud-server

A buddycloud server written in Node.
http://buddycloud.org
Apache License 2.0
139 stars 12 forks source link

Following a private channel responds with unexpected stanza #110

Open lloydwatkin opened 11 years ago

lloydwatkin commented 11 years ago

From lloyd.watkin@surevine.com I attempted to follow lloyd+dev4@buddycloud.org, I received the following unexpected stanza back:

<message type="headline" to="channels.surevine.com" from="channels.buddycloud.org"><x xmlns="jabber:x:data" type="form">
    <title>Confirm channel subscription</title>
    <instructions>Allow lloyd.watkin@surevine.com to subscribe to node /user/lloyd+dev4@buddycloud.org/posts?</instructions>
    <field type="hidden" var="FORM_TYPE">    
        <value>http://jabber.org/protocol/pubsub#subscribe_authorization</value>
    </field>
    <field type="text-single" var="pubsub#node" label="Node">
        <value>/user/lloyd+dev4@buddycloud.org/posts</value>
    </field>
    <field type="jid-single" var="pubsub#subscriber_jid" label="Subscriber Address">
        <value>lloyd.watkin@surevine.com</value>
    </field>
    <field type="boolean" var="pubsub#allow" label="Allow?">
        <value>false</value>
    </field>
</x>
</message>

Unexpected because lloyd.watkin@surevine.com is (or has not been) a moderator or owner of this channel at any point.

lloydwatkin commented 11 years ago

This may be design and anyone attempting to respond that does not have permission is refused. In the java server these notifications are sent to owners and mods, if this is by design then please let me know and I'll update java server to match.

lloydwatkin commented 11 years ago

Also I don't get this stanza posted through to the account on demo.buddycloud.org :(

lloydwatkin commented 11 years ago

Here's what is seen in the demo.buddycloud.org server logs, confirmed its not sending out notifications to owner for some reason:

[Thu, 04 Apr 2013 11:17:04 GMT] INFO [router] run subscribe-node /user/lloyd+dev4@buddycloud.org/posts by lloyd.watkin@surevine.com(user)/channels.surevine.com
[Thu, 04 Apr 2013 11:17:04 GMT] INFO [router] run subscribe-node /user/lloyd+dev4@buddycloud.org/status by lloyd.watkin@surevine.com(user)/channels.surevine.com
[Thu, 04 Apr 2013 11:17:04 GMT] INFO [router] run subscribe-node /user/lloyd+dev4@buddycloud.org/subscriptions by lloyd.watkin@surevine.com(user)/channels.surevine.com
[Thu, 04 Apr 2013 11:17:04 GMT] INFO [router] run subscribe-node /user/lloyd+dev4@buddycloud.org/geo/previous by lloyd.watkin@surevine.com(user)/channels.surevine.com
[Thu, 04 Apr 2013 11:17:04 GMT] INFO [router] run subscribe-node /user/lloyd+dev4@buddycloud.org/geo/current by lloyd.watkin@surevine.com(user)/channels.surevine.com
[Thu, 04 Apr 2013 11:17:04 GMT] INFO [router] run subscribe-node /user/lloyd+dev4@buddycloud.org/geo/next by lloyd.watkin@surevine.com(user)/channels.surevine.com
[Thu, 04 Apr 2013 11:17:04 GMT] INFO [xmpp/backend_pubsub] notifying channels.surevine.com for /user/lloyd+dev4@buddycloud.org/posts
[Thu, 04 Apr 2013 11:17:04 GMT] INFO [xmpp/backend_pubsub] notifying channels.surevine.com for /user/lloyd+dev4@buddycloud.org/status
[Thu, 04 Apr 2013 11:17:04 GMT] INFO [xmpp/backend_pubsub] notifying channels.surevine.com for /user/lloyd+dev4@buddycloud.org/geo/current
[Thu, 04 Apr 2013 11:17:04 GMT] INFO [xmpp/backend_pubsub] notifying channels.surevine.com for /user/lloyd+dev4@buddycloud.org/geo/previous
[Thu, 04 Apr 2013 11:17:04 GMT] INFO [xmpp/backend_pubsub] notifying channels.surevine.com for /user/lloyd+dev4@buddycloud.org/subscriptions
[Thu, 04 Apr 2013 11:17:04 GMT] INFO [xmpp/backend_pubsub] notifying channels.surevine.com for /user/lloyd+dev4@buddycloud.org/geo/next
[Thu, 04 Apr 2013 11:17:05 GMT] INFO [router] run retrieve-node-items /user/lloyd+dev4@buddycloud.org/posts by lloyd.watkin@surevine.com(user)/channels.surevine.com
[Thu, 04 Apr 2013 11:17:05 GMT] INFO [router] run browse-node-info /user/lloyd+dev4@buddycloud.org/posts by channels.surevine.com(server)/channels.surevine.com
[Thu, 04 Apr 2013 11:17:05 GMT] INFO [router] run browse-node-info /user/lloyd+dev4@buddycloud.org/status by channels.surevine.com(server)/channels.surevine.com
[Thu, 04 Apr 2013 11:17:05 GMT] INFO [router] run browse-node-info /user/lloyd+dev4@buddycloud.org/subscriptions by channels.surevine.com(server)/channels.surevine.com
[Thu, 04 Apr 2013 11:17:05 GMT] INFO [router] run browse-node-info /user/lloyd+dev4@buddycloud.org/geo/previous by channels.surevine.com(server)/channels.surevine.com
[Thu, 04 Apr 2013 11:17:05 GMT] INFO [router] run browse-node-info /user/lloyd+dev4@buddycloud.org/geo/current by channels.surevine.com(server)/channels.surevine.com
[Thu, 04 Apr 2013 11:17:05 GMT] INFO [router] run browse-node-info /user/lloyd+dev4@buddycloud.org/geo/next by channels.surevine.com(server)/channels.surevine.com 
lloydwatkin commented 11 years ago

Ok, this is rather strange. I have now un-followed then re-followed lloyd+dev4@buddycloud.org as lloyd+dev3@buddycloud.org and I'm getting the headline message sent through to lloyd.watkin@surevine.com. This explains the above behaviour but not why I'm getting the message in the first place.

The UI shows lloyd+dev4@buddycloud.org as a moderator of their own channel.

<message type="headline" to="channels.surevine.com" from="channels.buddycloud.org"><x xmlns="jabber:x:data" type="form"><title>Confirm channel subscription</title><instructions>Allow lloyd+dev3@buddycloud.org to subscribe to node /user/lloyd+dev4@buddycloud.org/posts?</instructions><field type="hidden" var="FORM_TYPE"><value>http://jabber.org/protocol/pubsub#subscribe_authorization</value></field><field type="text-single" var="pubsub#node" label="Node"><value>/user/lloyd+dev4@buddycloud.org/posts</value></field><field type="jid-single" var="pubsub#subscriber_jid" label="Subscriber Address"><value>lloyd+dev3@buddycloud.org</value></field><field type="boolean" var="pubsub#allow" label="Allow?"><value>false</value></field></x></message>