-
Notifications
You must be signed in to change notification settings - Fork 152
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
Conversation
Update matrix-appservice-bridge to 2.2.0-rc2
f03b872
to
a9483fe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question inline
src/bridge/IrcBridge.ts
Outdated
userIds = [event.sender]; | ||
} | ||
else if (event.type === "m.receipt") { | ||
userIds = Object.keys(Object.values(event.content).map((v) => v["m.read"])); |
There was a problem hiding this comment.
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.read
s? Surely we still only want the sender in this point? Or you refresh the whole list whenever there's a new m.receipt
?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
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.