Matrix-Chatfenster (read-only) im Dashboard integrieren

This commit is contained in:
Kai
2026-02-17 15:42:58 +01:00
parent 53d4052446
commit 234bd7e182
9 changed files with 207 additions and 2 deletions

View File

@@ -69,6 +69,16 @@ func (a *App) handleDashboard(w http.ResponseWriter, r *http.Request) {
Calendar: buildCalendar(plans, crops, products, stepMap, customTasks, doneMap, (settings.CurrentCycle*12)+(settings.CurrentMonth-1), settings.CurrentDay, settings.DaysPerMonth, 14),
PlanningCount: len(plans),
}
if a.matrix != nil {
data.MatrixEnabled = true
data.MatrixRoomID = a.matrix.RoomID
msgs, err := a.matrix.FetchRecentMessages(r.Context())
if err != nil {
data.MatrixError = err.Error()
} else {
data.MatrixMessages = msgs
}
}
data.TodayGroups = groupTasksByField(data.TodayTasks)
a.renderTemplate(w, "templates/dashboard.html", data)
}