def sendClubToPersonNty(msgfromuser,msgfname,msgtouser,msgcontent): message = Message() message.fromuser = msgfromuser message.fname = msgfname message.touser = msgtouser message.msgtype = MessageEnum.C2PNotification message.content = msgcontent try: message.save() return message.id except: return 0
def sendSystemNty(msgfromuser,msgtouser,msgcontent): message = Message() message.fromuser = msgfromuser message.fname = "System" message.touser = msgtouser message.msgtype = MessageEnum.SystemNotification message.content = msgcontent try: message.save() return message.id except: return 0
def sendFriendConversation(msgfromuser,msgfname,msgtouser,msgcontent): message = Message() message.fromuser = msgfromuser message.fname = msgfname message.touser = msgtouser message.msgtype = MessageEnum.FriendConversation message.content = msgcontent try: message.save() return message.id except: return 0