mirror of
https://github.com/Reckless-Satoshi/robosats.git
synced 2024-08-17 07:40:38 +03:00
Fix missing maker/taker in chatroom when first peers is WS and second is REST
This commit is contained in:
parent
88cd6d25b6
commit
82e4be8084
@ -36,6 +36,8 @@ class ChatRoomConsumer(AsyncWebsocketConsumer):
|
||||
defaults={
|
||||
"maker": self.user,
|
||||
"maker_connected": True,
|
||||
"taker": order.taker,
|
||||
"taker_connected": True,
|
||||
},
|
||||
)
|
||||
|
||||
@ -47,6 +49,8 @@ class ChatRoomConsumer(AsyncWebsocketConsumer):
|
||||
defaults={
|
||||
"taker": self.user,
|
||||
"taker_connected": True,
|
||||
"maker": order.maker,
|
||||
"maker_connected": False,
|
||||
},
|
||||
)
|
||||
|
||||
|
@ -77,7 +77,7 @@ class ChatView(viewsets.ViewSet):
|
||||
},
|
||||
)
|
||||
|
||||
# Poor idea: is_peer_connected() mockup. Update connection status based on last time a GET request was sent
|
||||
# is_peer_connected() mockup. Update connection status based on last time a GET request was sent
|
||||
if chatroom.maker == request.user:
|
||||
chatroom.taker_connected = order.taker.last_login > (
|
||||
timezone.now() - timedelta(minutes=1)
|
||||
|
Loading…
Reference in New Issue
Block a user