cemgunay / coleaseum-webapp

COLEASEUM
https://coleaseum-webapp.vercel.app
1 stars 0 forks source link

Messaging #26

Closed cemgunay closed 9 months ago

cemgunay commented 10 months ago

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

Real Time

Best way to play around...

  1. Have 2 browsers open with different users signed in (cem2 and cem1 already have messages or cem2 and nathanclairmonte@outlook.com)
  2. Create a direct message from "contact host" button in listing or just create a group chat from inbox
  3. See the conversation get created on other browser
  4. Send messages/images back and forth
  5. See the conversation if you are in inbox get updated real time or if you are in messages (/inbox/conversation/[conversationId]) see the messages get updated in real time with read receipts
  6. Add users to existing conversations to see the system messages
  7. See the drawer update with new emails when new users are added in real time

note: 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

nathanclairmonte commented 10 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:

cemgunay commented 9 months ago

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