Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brclient: persist PM/GCM msgs for clientrpc #110

Merged
merged 11 commits into from Feb 14, 2023

Conversation

miki-totefu
Copy link
Collaborator

this stores received msgs (PMs and GCms) in a message store so that clientrpc clients may retrieve them, which prevents missed messages in bots and other automation tools.

miki added 6 commits February 9, 2023 19:01
This makes calls to stream.Send() functions block until the message has
actually been sent on the wire. This change makes sending a notification
a synchronous event relative to the connection, making it easier to
reuse the object being sent, since it's guaranteed to be available for
use.
This fixes a bug that happened on the client side of a stream, when
multiple messages were received and queued for processing in a short
time. The queue elements were not properly popped, causing the first
element to be processed multiple times.

A test is added to lock in the correct behavior.
The replaymsglog is meant to hold messages temporarily for the
rpcserver, while the consumer for the messages is offline.
This adds the necessary messages and methods to control the replaymsglog
feature for PMs and GCMs in the client's RPC server.

In particular, it allows fetching unacked messages from the server
when initializing a stream and also to ack processed messages to remove
them from the replaymsg store.

The client rpcserver implementation is modified with dummy
implementation for the methods.
This adds the implementations to the replaymsglog feature in the
client's RPC server.

brclient is modified to setup the replaymsglog within the client db dir.
This demonstrates how to use the ack feature to fetch messages received
while the clientrpc client was offline.
@miki-totefu miki-totefu merged commit 951b36a into companyzero:master Feb 14, 2023
@miki-totefu miki-totefu deleted the api branch February 27, 2023 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants