Browse Source

passing own-id

Rodja Trappe 1 năm trước cách đây
mục cha
commit
c49fc34f9e
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      examples/chat_app/main.py

+ 1 - 1
examples/chat_app/main.py

@@ -21,7 +21,7 @@ async def main(client: Client):
         stamp = datetime.utcnow().strftime('%X')
         messages.append((user_id, avatar, text.value, stamp))
         text.value = ''
-        chat_messages.refresh()
+        chat_messages.refresh(user_id)
 
     user_id = str(uuid4())
     avatar = f'https://robohash.org/{user_id}?bgset=bg2'