PrimeAcademy / biscayne-syllabus

1 stars 4 forks source link

Messaging component not updating in real time after deployment but works locally #30

Open janetscanlon opened 1 week ago

janetscanlon commented 1 week ago

Description

Your Real Name

Janet

What do you want to happen? The message component should update in real time after users send messages What is actually happening?

The messages component is not updating in realtime using socket even though it is functional on localhost.

Screenshots / Code Snippets

Screenshot 2024-06-26 at 4 12 05 PM Screenshot 2024-06-26 at 4 12 42 PM Screenshot 2024-06-26 at 4 13 21 PM Screenshot 2024-06-26 at 4 13 32 PM

What did you try? Who did you ask?

What branch is your code on? Did you git push?

When was the last time you took a break?

janetscanlon commented 1 week ago

update on this! I made some good progress, and live chat works now on my branch. I'm working through why when the user sends a message, the user receiving the message gets a duplicate of the message. Screenshot 2024-06-27 at 8 45 38 AM

Note: Not currently worried about the initial fetch of the persistent messages from the db

server code:

Screenshot 2024-06-27 at 8 46 51 AM

Client side: Screenshot 2024-06-27 at 8 49 50 AM Screenshot 2024-06-27 at 8 50 16 AM

janetscanlon commented 1 week ago

The INSERT INTO query runs successfully and only inserts into the table once