diff --git a/packages/backend/src/server/api/mastodon/helpers/notification.ts b/packages/backend/src/server/api/mastodon/helpers/notification.ts index aced5e6080..3b641067f1 100644 --- a/packages/backend/src/server/api/mastodon/helpers/notification.ts +++ b/packages/backend/src/server/api/mastodon/helpers/notification.ts @@ -26,10 +26,11 @@ function normalizeObjectArgs(q: Record) { if (k.endsWith("]")) { const segments = k.split("[").map((p) => p.replace(/]$/g, "")); let d = dict; - for (let i = 0; i < segments.length - 1; i++) { + for (let i = 0; i < segments.length - 2; i++) { if (!(segments[i] in d)) d[segments[i]] = {}; d = d[segments[i]]; } + d[segments[segments.length - 1]] = q[k]; } else { dict[k] = q[k]; }