forked from rDrama/rDrama
only emit catchup once
parent
4fe21f3e31
commit
6cc7d311a3
|
@ -133,14 +133,12 @@ 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('catchup', messages[request.referrer], room=request.referrer)
|
emit('typing', typing[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