Exemplo n.º 1
0
    def get(self):

        utils.add_response_headers(self.request, self.response.headers)
        self.response.headers['Content-Type'] = "text/plain"

        status = commonactions.publish_next()

        self.response.out.write(status + "\r\n")
Exemplo n.º 2
0
 def post(self):
     message = xmpp.Message(self.request.POST)
     sender = self.request.get('from').split('/')[0]
     if sender == '*****@*****.**':
         if message.body[0:5].lower() == 'hello':
             message.reply("Greetings!")
         if message.body[0:10].lower() == 'unpublish:':
             message.reply(commonactions.delete_item_from_publish_queue(message.body[11:]))
         if message.body.lower().strip() == 'publish':
             message.reply(commonactions.publish_next())
     else:
         message.reply("huh?")