Closed rvm-peercode closed 1 year ago
Merged met verkeerde versie
Hoi Matijs, het was wel de bedoeling om deze met master te mergen, aangezien het probleem dat wordt opgelost ook in master zit, volgens mij. Zou je daar nog eens naar kunnen kijken? Alvast bedankt!
In my database, the first mail code is
0
, wheregmc_mail_cause_target
isNever mail
. I assume this is not the correct code to use when subscribing, as this code is also used when unsubscribing.This change ensures we use the second mail code (which has id
100
andgmc_mail_cause_target
Mail
), as I assume was the intention here.Another option would be to use a hardcoded class value, like is done in https://github.com/GemsTracker/gemstracker-library/blob/master/classes/Gems/Snippets/Unsubscribe/EmailUnsubscribeSnippet.php#L61
If the database contents are different in live situations than this fix is incorrect; IMHO a better solution would not to rely on the order of mailcodes in the database, but to select the first mailcode where
gmc_mail_to_target
isYes
, or wheregmc_for_surveys
is1
. Please advise.