Skip to content

Release 7.6.2 #36106

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

Merged
merged 5 commits into from
May 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/odd-beds-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Fixes an issue that caused Hono to not process payloads with content type `x-www-form-urlencoded` correctly
42 changes: 42 additions & 0 deletions apps/meteor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
# @rocket.chat/meteor

## 7.6.1

### Patch Changes

- Bump @rocket.chat/meteor version.

- ([#36060](https://github.com/RocketChat/Rocket.Chat/pull/36060) by [@dionisio-bot](https://github.com/dionisio-bot)) Fixes buffer as response from API

Currently, the only known case affected is Apps Engine icons. This patch ensures the API returns a buffer as the response, resolving issues with clients expecting a binary payload.

- ([#36033](https://github.com/RocketChat/Rocket.Chat/pull/36033) by [@dionisio-bot](https://github.com/dionisio-bot)) Fixes the Apps-Engine package installation, removing the dependency on an internal package

- <details><summary>Updated dependencies [587c3cafbd631b4275fd05497d3e463713583cc0]:</summary>

- @rocket.chat/[email protected]
- @rocket.chat/[email protected]
- @rocket.chat/[email protected]
- @rocket.chat/[email protected]
- @rocket.chat/[email protected]
- @rocket.chat/[email protected]
- @rocket.chat/[email protected]
- @rocket.chat/[email protected]
- @rocket.chat/[email protected]
- @rocket.chat/[email protected]
- @rocket.chat/[email protected]
- @rocket.chat/[email protected]
- @rocket.chat/[email protected]
- @rocket.chat/[email protected]
- @rocket.chat/[email protected]
- @rocket.chat/[email protected]
- @rocket.chat/[email protected]
- @rocket.chat/[email protected]
- @rocket.chat/[email protected]
- @rocket.chat/[email protected]
- @rocket.chat/[email protected]
- @rocket.chat/[email protected]
- @rocket.chat/[email protected]
- @rocket.chat/[email protected]
- @rocket.chat/[email protected]
- @rocket.chat/[email protected]
</details>

## 7.6.0

### Minor Changes
Expand Down
7 changes: 5 additions & 2 deletions apps/meteor/app/api/server/definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,18 @@ type ActionThis<TMethod extends Method, TPathPattern extends PathPattern, TOptio
readonly token?: string;
});

export type ResultFor<TMethod extends Method, TPathPattern extends PathPattern> =
export type ResultFor<TMethod extends Method, TPathPattern extends PathPattern> = (
| SuccessResult<OperationResult<TMethod, TPathPattern>>
| FailureResult<unknown, unknown, unknown, unknown>
| UnauthorizedResult<unknown>
| NotFoundResult
| {
statusCode: number;
body: unknown;
};
}
) & {
headers?: Record<string, string>;
};

export type Action<TMethod extends Method, TPathPattern extends PathPattern, TOptions> =
| ((this: ActionThis<TMethod, TPathPattern, TOptions>) => Promise<ResultFor<TMethod, TPathPattern>>)
Expand Down
11 changes: 11 additions & 0 deletions apps/meteor/app/api/server/middlewares/honoAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ export const honoAdapter = (hono: Hono) => async (expressReq: Request, res: Resp
);
res.status(honoRes.status);
honoRes.headers.forEach((value, key) => res.setHeader(key, value));

if (!honoRes.body) {
res.end();
return;
}

if (honoRes.body instanceof ReadableStream) {
Readable.fromWeb(honoRes.body as any).pipe(res);
return;
}

// Converting it to a Buffer because res.send appends always a charset to the Content-Type
// https://github.com/expressjs/express/issues/2238
res.send(Buffer.from(await honoRes.text()));
Expand Down
Loading
Loading