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.
Description
Sopel now requests the
invite-notify
CAP. I couldn't think of anything useful for it to do with the notifications, except to log them like other channel events are, at the INFO level. A test case added forcoretasks
checks the expected log message.The
admin
plugin'sinvite_join
handler now ignoresINVITE
s not targeted at the bot. A newbuiltins/test_builtins_admin.py
test suite validates its invite-handling behavior. Of the four test cases,test_invite_accept_not_us
was the only one not already passing prior to patching the plugin.Progresses #971.
Checklist
make qa
(runsmake lint
andmake test
)Notes
Discovering some other old branches that I'd never created PRs for got me thinking, and I looked in the Branches list for other things that I might've forgotten about. This was one of them. Then I realized that
admin
would be broken-ish without changes, so I added that to the old branch before PRing it.Initially, I'm targeting this feature for Sopel 8.1—but it has potential as a "breaking change" for third-party plugin code that also listens for the
'INVITE'
event, if (likeadmin
) they aren't checking the target nick.In the very most cautious of worlds, we'd have to hold this until 9.0. I'd rather not, though, if we can consider
'INVITE'
handlers niche enough that it's not worth delaying.