Skip to content

Pinned threads should not be archived in questions #1084

@ankitsmt211

Description

@ankitsmt211

Describe the bug

Pinned messages/threads is a means to provide information in context of channel, but with current setup all threads are archived in questions regardless of state thus making this feature useless

Expected behavior

Bot should ignore pinned threads when archive routine is triggered
To Reproduce

  1. Tweak archive routine time from 12 hours to few minutes for testing on local setup
  2. Run local instance of bot
  3. create a thread in questions
  4. pin the thread
  5. wait for it to be archived

Additional context

  • HelpThreadAutoArchiver#shouldBeArchived method should skip threads which are pinned

  • HelpThreadAutoArchiver#shouldBeArchived should be moved before calling auto archive flow on each thread, it should skip threads using shouldBeArchived method

image

https://github.com/Together-Java/TJ-Bot/blob/develop/application/src/main/java/org/togetherjava/tjbot/features/help/HelpThreadAutoArchiver.java

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions