Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use EDU activity to determine user idleness #1152

Merged
merged 5 commits into from
Oct 15, 2020
Merged

Conversation

Half-Shot
Copy link
Contributor

Whereas previously we've relied on users sending messages to prove if they are a lurker, this change would check to see if the users have sent any federated activity like presence, read receipts or typing. This allows the idle kicker to be much more fair about who it kicks.

Copy link
Member

@benparsons benparsons left a comment

Choose a reason for hiding this comment

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

question inline

userIds = [event.sender];
}
else if (event.type === "m.receipt") {
userIds = Object.keys(Object.values(event.content).map((v) => v["m.read"]));
Copy link
Member

Choose a reason for hiding this comment

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

Is this taking ALL the m.reads? Surely we still only want the sender in this point? Or you refresh the whole list whenever there's a new m.receipt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Synapse sends new receipts in the format https://matrix.org/docs/spec/client_server/r0.6.0#m-receipt, which makes it a bit tricky to determine what's changed. We could do some quick filtering to exclude stale receipts though.

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've tried something else.

@Half-Shot Half-Shot requested a review from benparsons October 15, 2020 15:52
Copy link
Member

@benparsons benparsons left a comment

Choose a reason for hiding this comment

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

lgtm

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.

2 participants