Compare commits

..

1 Commits

Author SHA1 Message Date
5ea5020a16 basic support for pagination 2018-07-26 09:36:37 -04:00
2 changed files with 3 additions and 5 deletions

View File

@ -28,17 +28,16 @@ def qm_only(msg=""):
def _nop(*args, **kwargs):
data = args[0]
room = data.get("room")
res = db.get_quest_meta(quest_id=room)
res = db.get_quest_meta(room)
if not res:
return msg
if session.get("user_id") != res[3]:
if session.get("user_id") != res[2]:
return msg
return func(*args, **kwargs)
return _nop
return actual_decorator
@socketio.on('joined')
def joined(data):
"""

View File

@ -5,7 +5,7 @@ var tid = setInterval( function () {
clearInterval( tid );
document.getElementById('chatWindow').scrollTop = document.getElementById('chatWindow').scrollHeight;
socket = io.connect('https://' + document.domain + '/anonkun:' + location.port);
socket = io.connect('https://' + document.domain + location.port);
socket.on('connect', function() {
socket.emit('joined', {room: room_id});
});
@ -223,7 +223,6 @@ function makePost() {
let text = qparea.value.trim();
qparea.value = '';
if (text == '') { return; }
console.log(page_num);
socket.emit('new_post', {post: text, page_num: page_num, room: room_id});
}
function edit_post(post_id) {