When we restart the server and rejoin the same room on the client, all previous messages disappear! š± The client is currently storing all messages in the messages folder as text files, with each file named after the room.
šÆ Your Objective:
Your goal is to modify the functionality so that messages are read from the file. This way, even after server restarts, clients that were already connected will see the messages! šāØ
ā How Will This Work?
Here's the plan:
Read Messages from File: The client software should read the messages from the corresponding text file for that room (messages/{roomname}.txt).
Unique Identifiers: Each message should have a unique identifier to avoid duplication when displaying messages. You could use timestamps or message hashes for this.
Change the Save Logic: Instead of fetching messages from the server first, the client should save messages to the file before displaying them. This way, it can read directly from the file to show the existing messages.
ā ļø Important Note:
This issue is only for first-time contributors to this repository!
š» Have Fun!
Get creative and enjoy working on this challenge! We appreciate your contributions! š
š Issue for First-Time Contributors Only! š
š Current Problem:
When we restart the server and rejoin the same room on the client, all previous messages disappear! š± The client is currently storing all messages in the
messages
folder as text files, with each file named after the room.šÆ Your Objective:
Your goal is to modify the functionality so that messages are read from the file. This way, even after server restarts, clients that were already connected will see the messages! šāØ
ā How Will This Work?
Here's the plan:
messages/{roomname}.txt
).ā ļø Important Note:
This issue is only for first-time contributors to this repository!
š» Have Fun!
Get creative and enjoy working on this challenge! We appreciate your contributions! š
[ for any doubts , feel free to comment ]