FIX: attempts to use params from addDiscoveryQueryParam (PR #8007)

This commit will for example allow this:

api.addDiscoveryQueryParam("my_param", { persist: true });

If you page is forum.foo.bar/?my_param=1, when clicking on an “unread” link for example this query string will be kept.

GitHub

You’ve signed the CLA, jjaffeux. Thank you! This pull request is ready for review.

This seems OK to me.