Skip to content

Conversation

@vivekjoshy
Copy link
Contributor

… Both these can be used to configure modmail to auto close a thread after some time has passed.

thread_auto_close_response has a %t variable that can be used to insert human friendly time into the closing message.

This does not auto close threads that already exist and will have to be manually closed. But once the variable is configured, it will take it from there for every new thread.

Take a look at this P.R with two sets of eyes as this is my first attempt at calling methods that I did not write.

Resolves #161

… Both these can be used to configure modmail to auto close a thread after some time has passed.

`thread_auto_close_response` has a `%t` variable that can be used to insert human friendly time into the closing message.

async def _grab_timeout(
self
) -> typing.Union[None, isodate.duration.Duration, timedelta]:
Copy link
Collaborator

Choose a reason for hiding this comment

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

do this instead in one line:

async def _grab_timeout(self) -> typing.Union[None, isodate.duration.Duration, timedelta]:

Also, rename the function to _fetch_timeout 😛

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was following PEP8. Are we using a different code style? 😅

Copy link
Collaborator

Choose a reason for hiding this comment

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

We follow our code style lul

whatever looks/works best i guess..

Copy link
Collaborator

Choose a reason for hiding this comment

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

Just use black for code formatting.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@fourjr I committed that into one line, but the second black formatting commit reverted it back.

@kyb3r
Copy link
Collaborator

kyb3r commented Jun 24, 2019

Can you also reflect the changes in the changelog? Thanks :)

@kyb3r kyb3r merged commit 45a23ec into modmail-dev:master Jun 25, 2019
@vivekjoshy vivekjoshy deleted the auto-close-thread branch August 9, 2019 05:45
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.

suggestion: auto close ticket after specific time

3 participants