Skip to content

Features/add command to reset activity for a help thread - #739

Merged
CodePawfect merged 23 commits into
Together-Java:developfrom
CodePawfect:features/add-command-to-reset-activity-for-a-help-thread
Jan 20, 2023
Merged

CodePawfect merged 23 commits into
Together-Java:developfrom
CodePawfect:features/add-command-to-reset-activity-for-a-help-thread

Conversation

@CodePawfect

@CodePawfect CodePawfect commented Jan 1, 2023 •

Copy link
Copy Markdown
Contributor

Description

closes #567 This pull request modifies the HelpThreadActivityUpdater class. The changes include:

  • Adding a Cache field that stores the message ID of the most recent message in a thread channel when reset-activity command is triggered.
  • Modifying the updateActivityForThread method to use the cache to determine the activity level of a thread if existing.

Performance

How are entries in the cache deleted?
Entries in the cache are deleted in two ways:

  • If someone closes a thread with the close command, the channel that is the key in the cache entry is removed.
  • An entry in the cache is automatically removed after 12 hours. I think this should be enough, but it can be increased if needed.

Tests

image

image

@CodePawfect
CodePawfect requested review from a team as code owners January 1, 2023 11:11
@CodePawfect
CodePawfect marked this pull request as draft January 1, 2023 11:13
@CodePawfect
CodePawfect requested a review from Taz03 January 3, 2023 10:47
@CodePawfect
CodePawfect marked this pull request as ready for review January 3, 2023 12:01
@CodePawfect CodePawfect linked an issue Jan 3, 2023 that may be closed by this pull request
@CodePawfect CodePawfect added enhancement New feature or request priority: major new command Add a new command or group of commands to the bot labels Jan 3, 2023
@CodePawfect CodePawfect self-assigned this Jan 3, 2023
@CodePawfect
CodePawfect requested a review from Taz03 January 3, 2023 14:25
@CodePawfect
CodePawfect marked this pull request as draft January 4, 2023 09:02
@CodePawfect
CodePawfect marked this pull request as ready for review January 5, 2023 17:38
@CodePawfect
CodePawfect requested a review from Taz03 January 5, 2023 21:36
@CodePawfect
CodePawfect requested a review from Taz03 January 6, 2023 04:23
Taz03
Taz03 previously approved these changes Jan 6, 2023
@Taz03
Taz03 dismissed their stale review January 6, 2023 07:28

i missed something

@CodePawfect
CodePawfect requested a review from Taz03 January 6, 2023 09:16
Taz03
Taz03 previously approved these changes Jan 6, 2023
@CodePawfect
CodePawfect requested review from Taz03 and Zabuzard January 13, 2023 13:56
changed description text for reset activity command
PR #739
@CodePawfect
CodePawfect requested a review from Zabuzard January 18, 2023 18:11

@Zabuzard Zabuzard left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good stuff

@CodePawfect
CodePawfect merged commit 32b0acb into Together-Java:develop Jan 20, 2023
@CodePawfect
CodePawfect deleted the features/add-command-to-reset-activity-for-a-help-thread branch January 20, 2023 08:48
@Zabuzard Zabuzard mentioned this pull request Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request new command Add a new command or group of commands to the bot priority: major

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add command to reset activity for a help thread

3 participants