0.2.72 - Magic button, Next up fixes
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user