 NS = require('./ns')
 errors = require('../errors')
 forms = require('./forms')
+RSM = require('./rsm')
 
 class Request
     constructor: (conn, @opts, cb) ->

    decodeReply: (stanza) ->
        @results = []
        pubsubEl = stanza?.getChild('pubsub', @xmlns)
        if pubsubEl? and @decodeReplyEl?
            for child in pubsubEl.children
                unless typeof child is 'string'
                    @decodeReplyEl child
        @results

class CreateNode extends PubsubRequest

        if @opts.actor
            pubsubEl.c('actor', xmlns: NS.BUDDYCLOUD_V1).
                t(@opts.actor)
        if @opts.rsm
            pubsubEl.cnode RSM.toXml(@opts.rsm)
        pubsubEl.up()

    iqType: ->
