Skip to content

Conversation

@Half-Shot
Copy link
Contributor

Fixes #388

This PR introduces the ability to periodically remove users who have not interacted with the bridge (or homeserver) in a given period. It uses matrix-lastactive in order to detect which users are offline.

This is checked first by local activity (e.g. sending messages/member events), then by presence (if enabled) and finally by use of the admin api for local users (if the user is allowed to make admin calls).

This fundamentally automates the process that matrix.org is already using for reaping users on it's Freenode bridge.

@Half-Shot Half-Shot requested a review from turt2live July 8, 2019 19:57
@Half-Shot
Copy link
Contributor Author

@turt2live I've given you the gift of ✔️

Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

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

also test failures - I thought we fixed that?

@Half-Shot
Copy link
Contributor Author

also test failures

say what?

@turt2live
Copy link
Member

I swear it was red when I started reviewing it

@Half-Shot Half-Shot force-pushed the hs/automatically-disable-inactive branch from f555102 to a1fa782 Compare July 9, 2019 20:52
@Half-Shot
Copy link
Contributor Author

(sorry for the force push, I thought I hadn't pushed before)

@Half-Shot Half-Shot requested a review from turt2live July 9, 2019 21:51
Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

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

lgtm assuming the logging code outputs a compatible logger. Also if we have documentation on the debug API, we should put this endpoint in there.

And last thing: please rename the PR title before merging to better represent the thing.

# "off" - Defaults to disabled, users can choose to enable.
# "force-off" - Disabled, cannot be enabled.
mapIrcMentionsToMatrix: "on" # This can be "on", "off", "force-off".

Copy link
Member

Choose a reason for hiding this comment

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

irrelevant diff

@Half-Shot
Copy link
Contributor Author

lgtm assuming the logging code outputs a compatible logger

I checked, it does :).

Also if we have documentation on the debug API, we should put this endpoint in there.

We don't, but I'll add a wiki page.

@Half-Shot Half-Shot changed the title Automatically quit users who have been idle for a while Add a debug API endpoint to quit users who have been idle for a while Jul 9, 2019
@Half-Shot Half-Shot merged commit 56deea3 into develop Jul 9, 2019
@jaller94 jaller94 deleted the hs/automatically-disable-inactive branch March 27, 2020 14:47
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.

3 participants