0.2.72 - Magic button, Next up fixes

This commit is contained in:
ponzischeme89
2026-08-17 11:41:36 +12:00
parent 36cb1324fd
commit 12b27c77c3
2655 changed files with 5435 additions and 254 deletions
+7
View File
@@ -34,6 +34,7 @@ type adminOnboardingPreferences struct {
type adminMembyAccount struct {
ID string `json:"id"`
Username string `json:"username"`
Initials string `json:"initials"`
CreatedAt time.Time `json:"createdAt"`
LastSeen time.Time `json:"lastSeen"`
Devices []store.MembyDevice `json:"devices"`
@@ -138,6 +139,7 @@ func (s *Server) handleAdminAccounts(w http.ResponseWriter, r *http.Request) {
}
result = append(result, adminMembyAccount{
ID: account.ID, Username: account.Username, CreatedAt: account.CreatedAt,
Initials: stringPreference(accountSettings.Preferences, "profileInitials"),
LastSeen: account.LastSeen, Devices: account.Devices, Settings: accountSettings,
Themes: nonNilStrings(themes[account.ID]),
Notifications: notificationPrefs,
@@ -165,6 +167,11 @@ func (s *Server) handleAdminAccounts(w http.ResponseWriter, r *http.Request) {
})
}
func stringPreference(preferences map[string]any, key string) string {
value, _ := preferences[key].(string)
return value
}
// handleAdminNotificationPreferences changes what one person is told without requiring
// a television or an app release. The loaded value is decoded in place so a console from
// an older gateway generation cannot accidentally turn off fields it does not know.