MemeLabs / MemeLabs/dggchat

Proposal: guarantee message sent successfully if SendMessage() returns no error

Open
#6 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
4
Forks
5
PR merge metrics
No merged PRs in 30d

Description

Right now errors are handled by the errorHandler, but it's not possible to determine for what message the error was and thus handling it is not really possible.

It is possible to determine if the message was sent successfully if we wait for the ws to respond with either an error or confirmation.
There would need to be a mutex for the ws that gets locked every time we send a message until confirmation is received to prevent getting errors or confirmation meant for a different message.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing SendMessage and the errorHandler, then review how the websocket reports errors or confirmations. Done means each response can be associated with its message, successful sends are confirmed, and concurrent sends cannot mix responses.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.