def _event(self, result, event_type): if Event.exists(event_type): Event(event_type).fire(alert=self, severity=result[0], event=result[1], otherInfo=result[2] ) return self #transform the callback so the caller get's us
def notification(conversation, event, string): #hopefully you know how to parse this string if Event.exists(event): context = { 'conversation': conversation, 'message': string, 'event': event, } Event(event).fire(**context)
def notification(conversation, event, string): #hopefully you know how to parse this string if Event.exists(event): context = { 'conversation': conversation, 'message': string, 'event': event, } Event(event).fire(**context)