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

feat(network-message): Use redis entirely to store messages #161

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

dev-737
Copy link
Member

@dev-737 dev-737 commented Oct 15, 2024

This commit improves the handling of referenced messages in the network message
commands. The changes include:

  • Use getOriginalMessage and findOriginalMessage functions to fetch the
    original message data, handling both original and broadcast messages.
  • Fetch the hub data directly from the original message data, avoiding
    additional database queries.
  • Use the fetchHub function to retrieve the hub data, ensuring it is
    available.
  • Update the DeleteMessage command to use the broadcasts property of the
    original message instead of the broadcastMsgs property.
  • Refactor the NetworkReactionInteraction class to use the original message
    data directly, instead of relying on the broadcastedMessages table.

The goal of these changes is to improve the efficiency and reliability of the
network message handling, reducing database queries and ensuring consistent
data access.

This commit improves the handling of referenced messages in the network message
commands. The changes include:

- Use `getOriginalMessage` and `findOriginalMessage` functions to fetch the
  original message data, handling both original and broadcast messages.
- Fetch the hub data directly from the original message data, avoiding
  additional database queries.
- Use the `fetchHub` function to retrieve the hub data, ensuring it is
  available.
- Update the `DeleteMessage` command to use the `broadcasts` property of the
  original message instead of the `broadcastMsgs` property.
- Refactor the `NetworkReactionInteraction` class to use the original message
  data directly, instead of relying on the `broadcastedMessages` table.

The goal of these changes is to improve the efficiency and reliability of the
network message handling, reducing database queries and ensuring consistent
data access.
Copy link

sonarcloud bot commented Oct 15, 2024

@dev-737 dev-737 merged commit f0c111e into main Oct 15, 2024
3 of 5 checks passed
@dev-737 dev-737 deleted the messageInRedis branch October 15, 2024 10:06
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.

1 participant