Reoo88 commited on
Commit
621e0cf
·
1 Parent(s): e472ead

Guest detection: also check link_mic.linked_user_list

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -322,8 +322,10 @@ def _guest_observation(user):
322
  info=_as_dict(j.get('data'))
323
  if str(info.get('status'))!='2':continue
324
  if str(_as_dict(info.get('owner')).get('id_str') or info.get('owner_user_id') or '')==uid:continue
325
- linkers=info.get('linker_map')
326
- if not linkers or uid not in json.dumps(linkers,ensure_ascii=False):continue
 
 
327
  sources=rank_sources(_as_dict(info.get('stream_url')))
328
  if not sources:continue
329
  if _guest_logged.get(user)!=host_room:
 
322
  info=_as_dict(j.get('data'))
323
  if str(info.get('status'))!='2':continue
324
  if str(_as_dict(info.get('owner')).get('id_str') or info.get('owner_user_id') or '')==uid:continue
325
+ # الضيوف المرتبطون داخل الغرفة يظهرون في link_mic.linked_user_list (وقد يظهرون في linker_map أيضًا)
326
+ linked=_as_dict(info.get('link_mic')).get('linked_user_list') or []
327
+ linkers=[info.get('linker_map') or {}, linked]
328
+ if not any(linkers) or uid not in json.dumps(linkers,ensure_ascii=False):continue
329
  sources=rank_sources(_as_dict(info.get('stream_url')))
330
  if not sources:continue
331
  if _guest_logged.get(user)!=host_room: