def CmdSetOnlineDo(from_name,msg): if GetCmdNum(msg) == 1: if funcs.isInOnlinelist(from_name): return 'you are in online list' else: return 'you are NOT in online list' flag = GetCmdByNum(msg,2) if flag == 'on': funcs.addUserToOnlineUserList(from_name) return 'you are in online list' if flag == 'off': funcs.delUserFromOnlineUserList(from_name) return 'you are NOT in online list now'
def CmdSetOnlineDo(from_name, msg): if GetCmdNum(msg) == 1: if funcs.isInOnlinelist(from_name): return 'you are in online list' else: return 'you are NOT in online list' flag = GetCmdByNum(msg, 2) if flag == 'on': funcs.addUserToOnlineUserList(from_name) return 'you are in online list' if flag == 'off': funcs.delUserFromOnlineUserList(from_name) return 'you are NOT in online list now'
def post(self): # sender = self.request.get('from').split('/')[0] sender = xmpp_api.get_mail_name(self.request.get("from")).lower() if funcs.isInGroupUser(sender): funcs.addUserToOnlineUserList(sender)
def post(self): #sender = self.request.get('from').split('/')[0] sender = xmpp_api.get_mail_name(self.request.get('from')).lower() if funcs.isInGroupUser(sender): funcs.addUserToOnlineUserList(sender)