This happens because the named reference to the "Gitlab" class is replaced by a new version on reload, making the old instance no longer an instance of it.
(cherry picked from commit f5ffcee53f)
This behaviour was unclear and misleading for a number of reasons:
- The channel name was actually only used for checking the bot's channel presence, and not as the announcement target.
- What the plugin actually did is check *all* channels the bot is in on the target network for configured announcements,
and announce to all of them (regardless of what channel was given in the URL).
Backwards compatibility with the old URL format is kept with this commit.
(cherry picked from commit 630786e541)
Instead of fixing the webhook handler to the network where the plugin was loaded, dynamically search through networks (much like the plugin already did with channels).
This also makes the plguin raise an explicit error if a network+channel target is unknown, instead of leaving any frontend servers with confusing 502 (Bad Gateway) errors.
(cherry picked from commit 140d724fb3)