groupware: add retrieving and adding mailboxIds for drafts and sent if they are missing

This commit is contained in:
Pascal Bleser
2025-12-05 10:36:31 +01:00
parent 196ee7b3e4
commit ddbfef3ce3
7 changed files with 276 additions and 34 deletions

View File

@@ -170,11 +170,12 @@ func Missing[E comparable](expected, actual []E) []E {
return missing
}
func FirstKey[K comparable, V any](m map[K]V) *K {
func FirstKey[K comparable, V any](m map[K]V) (K, bool) {
for k := range m {
return &k
return k, true
}
return nil
var zero K
return zero, false
}
func Any[E any](s []E, predicate func(E) bool) bool {