def recv_notif(self, notif): print("recv_notif %s" % notif) n = Notif(notif) h = HipChat() if n.type == "reminder": h.sayHtml("@%s, I have to remind you to %s" % (n.to, n.message) if n.to else n.message, n.room) elif n.type == "notification": h.sayHtml("@%s %s" % (n.to, n.message) if n.to else n.message, n.room)