Project-Stage-Academy / UA-1131_Forum-PS

0 stars 0 forks source link

50 implement live chat for fast interaction #52

Closed haodn98 closed 7 months ago

haodn98 commented 7 months ago

Was implemented Live-Chat between two users, using django channels. To apps was added lib "Daphne", which is an HTTP server designed to serve Django Channels web applications."Daphne" is part of the Django Channels toolkit and provides support for asynchronous functions and events for Django. Step by step: 1.For conversation we need to create the chat( POST request with the email of receiver) image_2024-02-25_21-19-45

  1. Connect to the chat by the link ws://127.0.0.1:8000/ws/chat/chatroom(in our case - mongoDB id)/ , for connecting you need to add JWT token to the headers. image_2024-02-25_21-10-45
    1. Thile chat is active masseges are logged in Redis image_2024-02-25_21-10-22 After conversation ends and both users are disconnected Redis cache will be sent to mangoDB and saved by chating-session image_2024-02-25_21-12-26
haodn98 commented 7 months ago

PR stoped, in addition ll create tests for the task