Skip to content

Conversation

Zabuzard
Copy link
Member

@Zabuzard Zabuzard commented Aug 27, 2022

Motivation

Discord did some changes to the auto-archive system. They now only hide a channel after the set period and archive it only later (a week). That is a problem for us, since we relied on automatic archival after 24h for our help threads. Without it, they pile up and UX goes down.

Solution

Since Discord does not automatically close our channels properly anymore, we do it ourselves.

This PR adds a simple routine that periodically checks all help threads and archives them if there was no message sent since 24h.

example

Other

While at it, added a utility for the handleRequireOverviewChannel functionality that has been duplicated around 5 times.

Same with getActiveThreadsIn which also has been duplicated a couple of times.

Tests

The solution is well tested. Here are some edge cases (the archive period has been set to 2 minutes for testing):

  • Keep it alive by sending messages
    activity

  • Reopen after close
    closes again

@Zabuzard Zabuzard added enhancement New feature or request priority: major labels Aug 27, 2022
@Zabuzard Zabuzard self-assigned this Aug 27, 2022
@Zabuzard Zabuzard requested review from a team as code owners August 27, 2022 11:14
Tais993
Tais993 previously approved these changes Aug 27, 2022
* added "handleRequireOverviewChannel" helper to reduce code duplication
@Zabuzard Zabuzard force-pushed the feature/auto_archive_help_threads branch from 596f7c2 to 7d8e2f6 Compare August 28, 2022 08:03
@Zabuzard
Copy link
Member Author

Merging this, seems to be fine - if not, we can act afterwards. Want to accelerate development for this, need to get out a release for all the major improvements. Also, its weekened and I want to code a bit 😄

@Zabuzard Zabuzard merged commit b5b7c59 into develop Aug 28, 2022
@Zabuzard Zabuzard deleted the feature/auto_archive_help_threads branch August 28, 2022 08:04
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority: major
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants