fix: throw UnknownActivityException in activity provider - #436
Open
bakiburakogun wants to merge 1 commit into
Open
fix: throw UnknownActivityException in activity provider#436bakiburakogun wants to merge 1 commit into
bakiburakogun wants to merge 1 commit into
Conversation
Nextcloud 30+ logs a deprecation warning on every notification fetch that touches a BBB activity: OCA\BigBlueButton\Activity\Provider::parse() threw \InvalidArgumentException which is deprecated. Throw \OCP\Activity\Exceptions\UnknownActivityException when the event is not known to your provider ... Use the dedicated exception instead. It exists since Nextcloud 30, well below the app's current minimum (33). Signed-off-by: Baki Burak Öğün <burak@burakogun.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
On Nextcloud 30+ the activity framework logs a deprecation warning every time a notification/activity fetch touches a BBB event:
On a busy instance this shows up in the log for practically every user with BBB activities, drowning out real problems.
This PR switches the "not my app" guard in
Provider::parse()to the dedicatedUnknownActivityException, as requested by the deprecation message.Compatibility
OCP\Activity\Exceptions\UnknownActivityExceptionexists since Nextcloud 30 (@since 30.0.0), well below the app's currentmin-version="33"— no conditional handling needed.Test
Running with this change on Nextcloud 34.0.3: activities render as before and the deprecation warning is gone from the log.