-
Notifications
You must be signed in to change notification settings - Fork 295
Add on_teams_team_renamed "overload" #1418
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
There are no files selected for viewing
This file contains hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.
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.
This was actually a little trickier to implement than just using a simple overload because of this line. One of
on_teams_team_renamed_activity()
andon_teams_team_renamed()
has to call the other (line 615). I tried to consider how this impacts backwards-compat (below), but please look it over and think it through, letting me know if I missed anything.Regarding backwards-compat, there's really two ways to do this and I'm open to changing this
1. (current PR) Have
on_conversation_update_activity()
callon_teams_team_renamed()
The flow works like this:
on_conversation_update_activity()
on_conversation_update_activity()
callson_teams_team_renamed()
on_teams_team_renamed()
callson_teams_team_renamed_activity()
, if it hasn't been overriddenWorks for developers who:
on_conversation_update_activity()
on_teams_team_renamed_activity()
on_conversation_update_activity()
andon_teams_team_renamed_activity()
on_teams_team_renamed()
Does NOT work for developers who:
on_teams_team_renamed()
AND overriddenon_teams_team_renamed_activity()
, sinceon_conversation_update_activity()
will no longer callon_teams_team_renamed_activity()
on_teams_team_renamed()
would have accomplished nothing.1. (alternative PR) Have
on_conversation_update_activity()
callon_teams_team_renamed_**activity**()
The difference is basically that there are no changes made to
on_conversation_update_activity()
andon_teams_team_renamed_activity()
callson_teams_team_renamed()
The flow would work like this:
on_conversation_update_activity()
on_conversation_update_activity()
callson_teams_team_renamed_**activity**()
on_teams_team_renamed_activity()
callson_teams_team_renamed()
, if it hasn't been overriddenWorks for developers who:
on_conversation_update_activity()
on_teams_team_renamed_activity()
on_conversation_update_activity()
andon_teams_team_renamed_activity()
on_teams_team_renamed()
Does NOT work for developers who:
on_teams_team_renamed()
, they're already going to use it how they please.Summary
I went with the first option because it keeps
on_conversation_update_activity()
aligned through all the methods so that if future developers override it, it makes more "sense". However, option #1 also has potential backwards-compat issues, albeit very minimal. Open to changing things.