forked from rDrama/rDrama
hide shadowbanned typing
parent
9f78d32cde
commit
14beae872b
|
@ -278,11 +278,17 @@ def typing_indicator(data, v):
|
||||||
if not typing.get(room):
|
if not typing.get(room):
|
||||||
typing[room] = []
|
typing[room] = []
|
||||||
|
|
||||||
if data and v.username not in typing[room]:
|
typing_room = typing[room]
|
||||||
typing[room].append(v.username)
|
|
||||||
elif not data and v.username in typing[room]:
|
|
||||||
typing[room].remove(v.username)
|
|
||||||
|
|
||||||
|
if data and v.username not in typing[room]:
|
||||||
|
typing_room.append(v.username)
|
||||||
|
elif not data and v.username in typing[room]:
|
||||||
|
typing_room.remove(v.username)
|
||||||
|
|
||||||
|
if v.shadowbanned:
|
||||||
|
emit('typing', typing_room)
|
||||||
|
else:
|
||||||
|
typing[room] = typing_room
|
||||||
emit('typing', typing[room], room=room)
|
emit('typing', typing[room], room=room)
|
||||||
|
|
||||||
return ''
|
return ''
|
||||||
|
|
Loading…
Reference in New Issue