def post(self): sender = self.request.get('from').split('/')[0] u = User.get_by_key_name(sender) if u == None: u = User(email=sender) previously_available = u.is_available u.is_available = False u.put() if previously_available: Client.send_global_refresh() logging.info('User unavailable ' + sender) logging.info('stanza ' + self.request.get('stanza'))
def post(self): sender = self.request.get('from').split('/')[0] u = User.get_by_key_name(sender) if u == None: u = User(email=sender) previously_available = u.is_available u.show = self.request.get('show') u.show_time = datetime.datetime.now() u.is_available = True u.put() if not previously_available: Client.send_global_refresh() logging.info('User available ' + sender) logging.info('stanza ' + self.request.get('stanza')) logging.info('show ' + self.request.get('show'))