Skip to content

Update to Trixnity 5#121

Merged
dfuchss merged 1 commit intomainfrom
feature/trixnity-5
Jan 24, 2026
Merged

Update to Trixnity 5#121
dfuchss merged 1 commit intomainfrom
feature/trixnity-5

Conversation

@dfuchss
Copy link
Owner

@dfuchss dfuchss commented Jan 24, 2026

No description provided.

Copilot AI review requested due to automatic review settings January 24, 2026 20:55
@dfuchss dfuchss merged commit c52add6 into main Jan 24, 2026
6 checks passed
@sonarqubecloud
Copy link

@dfuchss dfuchss deleted the feature/trixnity-5 branch January 24, 2026 20:56
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates MensaBot to work with Trixnity 5 / Connect2x package namespace changes and the updated client initialization/auth flow.

Changes:

  • Migrate Trixnity imports from net.folivo.* to de.connect2x.* across handlers/commands.
  • Update Matrix client creation to the new MatrixClient.create(...) + classicLogin(...) flow and initialize lognity backend.
  • Bump matrix-bot-base dependency to 0.16.0-SNAPSHOT and adjust command construction accordingly.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/main/kotlin/org/fuchss/matrix/mensa/handler/command/SubscribeCommand.kt Updates Trixnity model imports to new namespace.
src/main/kotlin/org/fuchss/matrix/mensa/handler/command/ShowCommand.kt Updates Trixnity imports and message helper import to new namespace.
src/main/kotlin/org/fuchss/matrix/mensa/handler/CanteenFormatter.kt Updates RoomId import to new namespace.
src/main/kotlin/org/fuchss/matrix/mensa/Main.kt Migrates Matrix client startup/auth to Trixnity 5 APIs; sets Lognity backend; updates command wiring.
src/main/kotlin/org/fuchss/matrix/mensa/Config.kt Updates RoomId import to new namespace.
pom.xml Bumps matrix-bot-base to 0.16.0-SNAPSHOT and removes slf4j-simple dependency entry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +98 to 101
val existingMatrixClient = MatrixClient.create(createRepositoriesModule(config), createMediaStoreModule(config), createCryptoDriverModule()).getOrNull()
if (existingMatrixClient != null) {
return existingMatrixClient
}
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MatrixClient.create(...).getOrNull() will silently swallow any exception while opening an existing store (e.g., corrupted DB, incompatible schema). That can cause the bot to fall back to classicLogin and create a new device/session, masking the real failure. Consider handling the Result explicitly (e.g., log and rethrow unexpected errors, and only fall back when the failure indicates “no existing session”).

Copilot uses AI. Check for mistakes.
Comment on lines +105 to +108
.create(
createRepositoriesModule(config),
createMediaStoreModule(config),
createCryptoDriverModule(),
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

createRepositoriesModule(config), createMediaStoreModule(config), and createCryptoDriverModule() are re-created here even though they were just created for the “open existing client” attempt above. If these allocate resources (DB connections, file handles, crypto stores), consider creating them once and reusing them across both paths.

Copilot uses AI. Check for mistakes.
Comment on lines 61 to 64
<groupId>org.fuchss</groupId>
<artifactId>matrix-bot-base</artifactId>
<version>${matrix-bot-base.version}</version>
<version>0.16.0-SNAPSHOT</version>
</dependency>
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dependency on org.fuchss:matrix-bot-base is now pinned to a 0.16.0-SNAPSHOT. Snapshot artifacts can change over time and may disappear from the snapshot repo, making builds non-reproducible. If possible, prefer a released version, or ensure the intended snapshot repository is stable and document why a snapshot is required for this update.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants