Commit f30f3f5
committed
fix(whatsapp): address code review findings from Codex and manual review
P1 fixes:
- Parse Unix epoch timestamps with Time.zone.at instead of Time.zone.parse
which silently fell back to Time.current for all GoWA webhook messages
- Halt execution in resolve_device_id when inbox validation fails, preventing
NoMethodError on non-WhatsApp channels
P2 fixes:
- Fall back to ID-based query in messages_after when reference message is
deleted, preserving incremental cursor semantics (upstream behavior)
- Merge duplicate 'video'/'video_note' branches in case statement
- Replace update_column with update in inbox callback to run validations1 parent a5bbe3e commit f30f3f5
4 files changed
Lines changed: 16 additions & 8 deletions
File tree
- app
- controllers/api/v1/accounts/whatsapp_web
- finders
- models
- services/whatsapp
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
| 117 | + | |
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
124 | | - | |
| 125 | + | |
125 | 126 | | |
126 | | - | |
| 127 | + | |
| 128 | + | |
127 | 129 | | |
| 130 | + | |
128 | 131 | | |
129 | 132 | | |
130 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| |||
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
720 | 720 | | |
721 | 721 | | |
722 | 722 | | |
723 | | - | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
724 | 729 | | |
725 | 730 | | |
726 | 731 | | |
| |||
1091 | 1096 | | |
1092 | 1097 | | |
1093 | 1098 | | |
1094 | | - | |
| 1099 | + | |
1095 | 1100 | | |
1096 | 1101 | | |
1097 | 1102 | | |
1098 | | - | |
1099 | 1103 | | |
1100 | 1104 | | |
1101 | 1105 | | |
| |||
0 commit comments