Commit 9e01720
committed
fix: correct misleading DDP deprecation replacements
Initial pass shipped 18 deprecation-message replacements that pointed
developers at REST endpoints with materially different semantics or at
paths that did not exist. Independent review classified them as WRONG,
MISSING, or PARTIAL with silent-break risk:
WRONG (drop replacement, keep deprecation)
- 2fa:enable (TOTP enable vs email-2fa enable)
- 2fa:disable (TOTP disable vs send email code)
- deleteFileMessage (single-msg vs rooms.cleanHistory range purge)
- getMessages (batched IDs vs single chat.getMessage)
- loadNextMessages, loadSurroundingMessages
(forward/window fetch vs chat.syncMessages delta)
- readThreads (one thread vs whole-room read)
- getSetupWizardParameters (wizard subset vs settings.public)
- banner/dismiss (per-user set vs Banner.dismiss broadcast)
MISSING
- saveSettings (/v1/settings does not exist; only /v1/settings/:_id)
PARTIAL (room-type or shape mismatch — silent break for callers)
- loadHistory, joinRoom, leaveRoom, addUsersToRoom,
getRoomByTypeAndName (channels.* fails on p/d/l rooms)
- loadMissedMessages (chat.syncMessages has incompatible response)
- spotlight, slashCommand (REST drops required params)
For all 18, the replacement argument is now an empty array so the
deprecation logger still reports the removal version without pointing
to a wrong endpoint.
Also fills four mappings that the previous heuristic missed because of
case/separator differences or an unscanned EE api directory:
- autoTranslate.getSupportedLanguages
-> /v1/autotranslate.getSupportedLanguages
- autoTranslate.translateMessage
-> /v1/autotranslate.translateMessage
- subscriptions/get
-> /v1/subscriptions.get
- getReadReceipts (EE)
-> /v1/chat.getMessageReadReceipts
scripts/audit-ddp-methods.mjs gains:
- REST_DENYLIST that hard-blocks the 18 misleading mappings from being
re-derived if the heuristic runs again,
- lower-case and `/`-vs-`.` separator candidate paths so similarly
misspelled mappings get matched,
- apps/meteor/ee/server/api/ added to REST_DIRS so EE endpoints are
visible to the audit.
docs/ddp-replacement-review.md captures the per-method review notes.1 parent 75519d9 commit 9e01720
26 files changed
Lines changed: 925 additions & 485 deletions
File tree
- apps/meteor
- app
- 2fa/server/methods
- autotranslate/server/methods
- lib/server/methods
- utils/server
- version-check/server/methods
- ee/server/methods
- server
- methods
- publications
- room
- subscription
- docs
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| |||
0 commit comments