Closed DavideIadeluca closed 10 months ago
I can see where you are coming from here, and the underlying problem. However, the intention is that if dl_language_id
is null
, then the user does not want to restrict notifications to a particular language, and will therefore receive notifications for any language.
Okay, so I think I know what's going on now. By default, the setting to show "Any Language" as an option is enabled. Then, when following a tag, the option "Any language" is also selected by default.
In this case, it makes totally sense to don't pass any language id. And if the user only wants to follow a certain language, then the onclick handler is called and the respective language id passed.
The confusion stems from when the setting to show "Any Language" as an option is disabled. In this case, a language is visually already "selected" in the dropdown, but no onclick handlers are being called, when left unchanged, which are needed for the id to be passed as far as I understand.
I guess this would a case that needs to be covered?
This PR tries to address an issue when
fof/discussion-language
is used in combination withfof/follow-tags
.Problem Description:
dl_language_id
isNULL
in thetag_user
table.LanguageDropdown
inside theSubscriptionModal
and clicks on any language. This is because theonclick
method ofbuildDropdownContent
is called.Summary:
requestData
ifthis.language()
is nullNotes:
dl_language_id
instead of it beingNULL
. During testing though the language id was correctly passed after the change.dl_language_id
isNULL
to prevent incorrect notifications from being sent (in my case the bug was discovered with emails). I'll try to come up with a CLI command and propose another PR. Edit: #54