forked from rDrama/rDrama
fix last commit
parent
6cc7d311a3
commit
f64f0ddaf0
|
@ -146,6 +146,8 @@ socket.on('speak', function(json) {
|
||||||
|
|
||||||
socket.on('catchup', function(json) {
|
socket.on('catchup', function(json) {
|
||||||
for (const message of json) {
|
for (const message of json) {
|
||||||
|
const existing = document.getElementById(json['id'])
|
||||||
|
if (existing) break
|
||||||
handle_message(message)
|
handle_message(message)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -133,12 +133,14 @@ def refresh_online():
|
||||||
@limiter.limit(DEFAULT_RATELIMIT, key_func=get_ID)
|
@limiter.limit(DEFAULT_RATELIMIT, key_func=get_ID)
|
||||||
@admin_level_required(PERMS['CHAT'])
|
@admin_level_required(PERMS['CHAT'])
|
||||||
def connect(v):
|
def connect(v):
|
||||||
|
join_room(request.referrer)
|
||||||
|
|
||||||
if v.username not in online[request.referrer]:
|
if v.username not in online[request.referrer]:
|
||||||
join_room(request.referrer)
|
|
||||||
online[request.referrer].append(v.username)
|
online[request.referrer].append(v.username)
|
||||||
refresh_online()
|
refresh_online()
|
||||||
emit('catchup', messages[request.referrer], room=request.referrer)
|
|
||||||
emit('typing', typing[request.referrer], room=request.referrer)
|
emit('catchup', messages[request.referrer], room=request.referrer)
|
||||||
|
emit('typing', typing[request.referrer], room=request.referrer)
|
||||||
return '', 204
|
return '', 204
|
||||||
|
|
||||||
@socketio.on('disconnect')
|
@socketio.on('disconnect')
|
||||||
|
|
Loading…
Reference in New Issue