Esempio n. 1
0
    def get_reply(self, num):
        if not self.is_support(num):
            reply = TextMessage(self.navigate, **self.from_to)
            return reply.render_xml()

        reply = ArticlesMessage(**self.from_to)
        feature = self.features[num]
        reply.add_article(Article(**feature))
        return reply.render_xml()
Esempio n. 2
0
 def repeat_handler(message):
     content = message.content
     msg = dict(from_user=message.to_user, to_user=message.from_user)
     reply = TextMessage(content, **msg)
     return reply.render_xml()