def remove_group_member(appid, gid, memberid): Group.delete_group_member(g._imdb, gid, memberid) v = { "group_id":gid, "member_id":memberid, "timestamp":int(time.time()) } op = {"quit_group":v} send_group_notification(appid, gid, op, [memberid]) content = "%d,%d"%(gid,memberid) publish_message(g.rds, "group_member_remove", content)
def remove_group_member(appid, gid, member): memberid = member['uid'] Group.delete_group_member(g._db, gid, memberid) v = { "group_id":gid, "member_id":memberid, "timestamp":int(time.time()) } if member.get('name'): v['name'] = member['name'] if member.get('avatar'): v['avatar'] = member['avatar'] op = {"quit_group":v} send_group_notification(appid, gid, op, [memberid]) content = "%d,%d"%(gid,memberid) publish_message(g.rds, "group_member_remove", content)
def remove_group_member(appid, gid, member): memberid = member['uid'] Group.delete_group_member(g._db, gid, memberid) v = {"group_id": gid, "member_id": memberid, "timestamp": int(time.time())} if member.get('name'): v['name'] = member['name'] if member.get('avatar'): v['avatar'] = member['avatar'] op = {"quit_group": v} send_group_notification(appid, gid, op, [memberid]) content = { "group_id": gid, "member_id": memberid, "name": Group.GROUP_EVENT_MEMBER_REMOVE } publish_message(g.rds, content)