Closed cemgunay closed 9 months ago
Looks amazingggg bro this is really good stuff!! With the real-time it's wild how instantaneous it happens. I honestly don't have any like concrete changes I think we should make tbh! Here are few small things I noticed:
And that's it really! Here's what I tested out that is working perfectly:
Fixed, had to do with incorrect update message handling for the inbox updates and fixed the random refreshes by removing loading screen on SWR validation. I don't remember why I put that in there I hope it was by accident LOL
MESSAGINGGGGGGGG
this fixes #25
Ok so this ended up being way bigger of a branch than I thought but it's still pretty straightforward I'll try explain best as I can and how you can play around with it.
Inbox, Conversation, Messages
/host/inbox
and the subtenant inbox is accessed from/inbox.
/listing/[listingId]
) under "Subletted by user1" it will say "contact host" and user2 can click that to send a message./host/inbox
they will see this conversation but if they go to/inbox
they will not see this conversation, and vice versa foruser2
./host/inbox
route where in that case the person creating it gets the "tenant" roleReal Time
/inbox
and/host/inbox
) in real timeBest way to play around...
inbox
get updated real time or if you are in messages (/inbox/conversation/[conversationId]
) see the messages get updated in real time with read receiptsnote: cant remove users after adding them LOL but im too lazy to add that for this version of app I think (wouldnt be that hard with adding conversationOwner when creating but whatever can always add later). Also cant leave a group chat LOL.
LMK IF ANYTHING BREAKS
also change NEXT_PUBLIC_CLOUD_NAME to NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME in .env