-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chandler bug: Updating a Reminder Removes Associated user_notification_channels
#6776
Comments
user_notification_channels
user_notification_channels
This is really bad indeed. I'll fix this. Thanks so much for raising this bug. |
Hang on. This is actually working as expected. The reason is that it's actually easier to delete all the notif channels and generate them all again rather than going through them one by one and modify them. See https://github.com/monicahq/monica/blob/main/app/Domains/Contact/ManageReminders/Services/UpdateContactReminder.php#L89C7-L89C7 for reference. |
I'll close it but feel free to open it again if you feel this is still not right. |
Please reopen 🙂 Thanks for looking into this @djaiss! I know what you're getting at when you say that, but I think there's a bit of a misunderstanding. When that bit of code runs, it completely wipes out the Telegram connection that I have set up, I need to go back in to the settings and set up Telegram from scratch. It seems that Laravel is not just deleting the record in the pivot table, but actually going one level deeper and deleting that too, if that makes sense? The code was refactored back in September 2022, and I have a hunch it might have been broken since then 3fa0691#diff-5320638e148e1d8cac8cd9f8c6d7b02590b459bf3a8315e95efe882a14ba0225L94-R93 I've included below the full set of patches I had to make to Monica to get Telegram working. I considered opening a PR with this but I wasn't confident enough that this was all that needed to be done
|
- Updating an existing reminder no longer deletes the user's notification channels - Finishing the setup of a Telegram connection now triggers a scheduling of the user's notifications, making behavior consistent with how email verification works
🎉 This issue has been resolved in version 5.0.0-beta.4 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Describe the bug
Using the most recent build of Chandler, a pretty major issue occurs when updating a contact reminder which has been scheduled for a notification channel. While going through the update handler, all notification channels which that reminder is using are removed. Note: Not just the
contact_reminder_scheduled
records, but the overalluser_notification_channel
records. This is most definitely not the expected behavior. DB Engine: MySQL, hosting: DockerScreenshots
![image](https://private-user-images.githubusercontent.com/3743825/258661000-410cefb5-ab17-470d-be99-03bf9d19f73a.png?jwt=eyJhbGciOiJIUzI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UUs0WkElMkYyMDI1MDIwNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDZUMTM1MTM1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDFkOWIxNjg3YzM1NTA4ODcwYjBlNDY5NzE5NmE2ZWIyZWZlZjk0YTFkOTYxOGI4NTg5MGJhZWQ4NGFiMmMwNCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.6wT4jOCCDpABT2vYscoezGgCrajZ_GAOdcQ2LU0nj1M)
Additional context
Relevant code snippet: https://github.com/monicahq/monica/blob/chandler/app/Domains/Contact/ManageReminders/Services/UpdateContactReminder.php#L84-L87
The text was updated successfully, but these errors were encountered: