-
-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
I've been getting false return statuses because of the hard coded Listmonk responses.
When I've been using method 'confirm_optin' I've been getting false results. The return value was False, as if Listmonk didn't confirm a user.
When I check the listmonk admin dashboard I can see that the user is confirmed and the method call has worked.
After a bit of investigation I've found the problematic part, the return values are hardcoded in english. My language of Listmonk is different and thus I've been getting wrong results.
success_phrases = {
# New conformation was created now.
'Subscribed successfully.',
'Confirmed',
# They were already confirmed somehow previously.
'no subscriptions to confirm',
'No subscriptions',
}
text = resp.text or ''
return any(p in text for p in success_phrases)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels