Skip to content

Commit 390267c

Browse files
committed
fix: update direct message room creation method in FederationMatrix and enhance cross-platform build configuration in integration tests
1 parent 16f225b commit 390267c

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

ee/packages/federation-matrix/src/FederationMatrix.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ export class FederationMatrix extends ServiceClass implements IFederationMatrixS
188188
throw new Error('Creator not found in members list');
189189
}
190190

191-
const roomId = await federationSDK.createDirectMessageRoom({
191+
const roomId = await federationSDK.createDirectMessage({
192192
creatorUserId: userIdSchema.parse(`@${creator.username}:${this.serverName}`),
193193
members: members
194194
.filter((member) => member._id !== creatorId)

ee/packages/federation-matrix/tests/scripts/run-integration-tests.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,16 +236,29 @@ if [ "$START_CONTAINERS" = true ]; then
236236
log_info "Cleaning up previous build..."
237237
rm -rf "$BUILD_DIR"
238238

239+
# Configure yarn for cross-platform builds (needed for sharp and other native modules)
240+
# This adds support for linux and darwin (macOS) on arm64/x64 with glibc and musl
241+
log_info "Configuring yarn for cross-platform builds..."
242+
cd "$ROCKETCHAT_ROOT"
243+
cp .yarnrc.yml .yarnrc.yml.bak
244+
yarn config set supportedArchitectures --json '{"os": ["linux", "darwin"], "cpu": ["arm64", "x64"], "libc": ["glibc", "musl"]}'
245+
yarn install
246+
239247
# Build the project
240248
log_info "Building packages from project root..."
241-
cd "$ROCKETCHAT_ROOT"
242249
yarn build
243250

244251
# Build the Meteor bundle (must be run from the meteor directory)
245252
log_info "Building Meteor bundle..."
246253
cd "$ROCKETCHAT_ROOT/apps/meteor"
247254
METEOR_DISABLE_OPTIMISTIC_CACHING=1 meteor build --server-only --directory "$BUILD_DIR"
248255

256+
# Restore .yarnrc.yml after build completes
257+
if [ -f "$ROCKETCHAT_ROOT/.yarnrc.yml.bak" ]; then
258+
log_info "Restoring original yarn configuration..."
259+
mv "$ROCKETCHAT_ROOT/.yarnrc.yml.bak" "$ROCKETCHAT_ROOT/.yarnrc.yml"
260+
fi
261+
249262
log_success "Build completed!"
250263
else
251264
log_info "🚀 Using pre-built image: $PREBUILT_IMAGE"

0 commit comments

Comments
 (0)