Repository navigation
Conversation
Preview deploymentLast deployed
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Store the current reaction count for one configured Slack channel and emoji in D1. A retry can arrive after someone removes or re-adds a reaction. The writer applies changes in Slack event-time order so the count stays accurate.
Implements CTC-45.
Changes
applySlackReactionEvent(event)from@/server/data/slack-reactionswith the inner event after verifying the Slack signature. Pass throughevent_ts, the reacting user, and the message reference. The writer ignores unrelated events and stores only reaction identifiers and timing.getSlackReactionCount()on the server. It requires a club session, returns zero for an empty configured count, and reports missing configuration as unavailable.SLACK_REACTION_CHANNEL_IDandSLACK_REACTION_EMOJIin the server environment. Use the Slack channel ID and emoji name without surrounding colons.0003_slack_reaction_versions.sql. It stores one latest event time per reaction key. D1 updates this record and the existing active reaction table in one transaction.Testing
pnpm check. Formatting, lint, type checking, and all 102 tests passed, including six new local D1 tests.