Add room creation options endpoint and integrate with chat UI: Implement getRoomCreateOptions in ChatController and ChatService, add corresponding API route, and enhance MultiChatDialog for room creation with localized labels and validation. Update i18n files for new room creation features.

This commit is contained in:
Torsten Schulz (local)
2026-03-04 23:12:54 +01:00
parent ec077e3d3c
commit 1f4130a940
8 changed files with 251 additions and 35 deletions

View File

@@ -13,6 +13,7 @@ class ChatController {
this.sendOneToOneMessage = this.sendOneToOneMessage.bind(this);
this.getOneToOneMessageHistory = this.getOneToOneMessageHistory.bind(this);
this.getRoomList = this.getRoomList.bind(this);
this.getRoomCreateOptions = this.getRoomCreateOptions.bind(this);
}
async getMessages(req, res) {
@@ -175,6 +176,15 @@ class ChatController {
res.status(500).json({ error: error.message });
}
}
async getRoomCreateOptions(req, res) {
try {
const options = await chatService.getRoomCreateOptions();
res.status(200).json(options);
} catch (error) {
res.status(500).json({ error: error.message });
}
}
}
export default ChatController;