Skip to content

DEV: Refactor Chat::LookupChannelThreads to follow best practices #32771

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Flink
Copy link
Contributor

@Flink Flink commented May 16, 2025

  • use model where possible
  • extract threads fetching logic to its own action
  • refactor specs to follow current guidelines/best practices

@Flink Flink self-assigned this May 16, 2025
@github-actions github-actions bot added the chat PRs which include a change to Chat plugin label May 16, 2025
@Flink Flink marked this pull request as ready for review May 19, 2025 08:14
@Flink Flink requested a review from jjaffeux May 19, 2025 08:14
- use `model` where possible
- extract threads fetching logic to its own action
- refactor specs to follow current guidelines/best practices
@Flink Flink force-pushed the loic-refactor-lookup-channel-threads branch from 6c4b047 to c30b8d8 Compare May 19, 2025 12:31
)
.limit(params.limit)
.offset(params.offset)
Chat::Action::FetchThreads.call(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extracted all the logic/SQL to its own class, as it improves global readability of the service and makes it easier to spec all the edge-cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chat PRs which include a change to Chat plugin
Development

Successfully merging this pull request may close these issues.

1 participant