KorryKatti / Mirage

a chat app which doesn't store messages on the server
MIT License
9 stars 18 forks source link

side quest #18

Closed KorryKatti closed 1 month ago

KorryKatti commented 1 month ago

šŸŒŸ 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:

  1. Read Messages from File: The client software should read the messages from the corresponding text file for that room (messages/{roomname}.txt).
  2. Unique Identifiers: Each message should have a unique identifier to avoid duplication when displaying messages. You could use timestamps or message hashes for this.
  3. 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! šŸš€

[ for any doubts , feel free to comment ]

AnanteshG commented 1 month ago

Hey, I would love to work on this issue!

KorryKatti commented 1 month ago

Hey, I would love to work on this issue!

alright will assign to you