浏览代码

passing own-id

Rodja Trappe 1 年之前
父节点
当前提交
c49fc34f9e
共有 1 个文件被更改,包括 1 次插入1 次删除
  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'