This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Don't send normal presence updates over federation replication stream #9828
Merged
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
453f981
Always use send_presence_to_destinations rather than send_presence
erikjohnston 3210487
Use the presence stream to notify federation sender
erikjohnston 390b500
Add a maybe_send_presence_to_interested_destinations helper function
erikjohnston 10fdce3
Newsfile
erikjohnston af42262
Remove confusing duplicate `self.federation` var
erikjohnston 38ad482
Add a comment about federation ping
erikjohnston d5f7ca7
Update comment
erikjohnston File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add a maybe_send_presence_to_interested_destinations helper function
- Loading branch information
commit 390b500c7b186cdbe2aceef3869ba21d2c1f564b
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
it's rather confusing that
PresenceHandler
ends up with both_federation
andfederation
attributes, which are similar but different. I rather wonder ifmaybe_send_presence_to_interested_destinations
should be unconditional and theshould_send_federation
should happen in the callers.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.
Oh yes, that is horrible. At the end of this PR we end up in a bit of a halfway house, annoyingly. The really tedious bit is that
get_federation_sender
will throw on workers, but on master will return the send queue instead. I can move theshould_send_federation
to the call sites and then haveself._federation
set if its on master or a federation sender, and then in the next PR we can revert and clean it up a bit? (The next PR will remove the weirdness whereget_federation_sender
returns the queue on master)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 ended up doing something slightly different, and replaced instances of
self.federation
withself._federation
. This involves some assertions to keep mypy happy, but they are temporary until the next PR where we rip out the usage of the federation send queue.