 ##
 # *Owner* is not related to a required affiliation. The derived
 # *operations are all requested with the pubsub#owner xmlns.
-class PubsubOwnerRequest extends Request
-    constructor: (stanza) ->
-        super
-
-        @pubsubEl = @iq.getChild("pubsub", NS.PUBSUB_OWNER)
-        @setActor @pubsubEl
-
-    matches: () ->
-        (@iq.attrs.type is 'get' ||
-         @iq.attrs.type is 'set') &&
-        @pubsubEl?
-
-    reply: (child) ->
-        if child?
-            pubsubEl = new xmpp.Element("pubsub", xmlns: NS.PUBSUB_OWNER)
-            pubsubEl.cnode child
-            super pubsubEl
-        else
-            super()
+class PubsubOwnerRequest extends PubsubRequest
+    xmlns: NS.PUBSUB_OWNER
 
 # <iq type='get'
 #     from='hamlet@denmark.lit/elsinore'

###

class PubsubRequest extends Request
    constructor: (stanza) ->
        super

        @pubsubEl = @iq.getChild("pubsub", NS.PUBSUB)
        @setActor @pubsubEl

    matches: () ->


    reply: (child) ->
        if child?
            pubsubEl = new xmpp.Element("pubsub", { xmlns: @xmlns })
            pubsubEl.cnode child
            super pubsubEl
        else
