コード例 #1
0
ファイル: socketio.py プロジェクト: Polsaker/throat
def handle_message():
    if current_user.get_id():
        join_room('user' + current_user.uid)
        socketio.emit('uinfo', {'taken': current_user.score,
                                'ntf': current_user.notifications,
                                'mod_ntf': current_user.mod_notifications()},
                      namespace='/snt',
                      room='user' + current_user.uid)
コード例 #2
0
ファイル: socketio.py プロジェクト: happy-river/throat
def handle_message():
    if current_user.get_id():
        join_room("user" + current_user.uid)
        socketio.emit(
            "uinfo",
            {
                "taken": current_user.score,
                "ntf": current_user.notifications,
                "mod_ntf": current_user.mod_notifications(),
            },
            namespace="/snt",
            room="user" + current_user.uid,
        )