feat: support group invite privacy verification

This commit is contained in:
richjohnrambo
2026-09-12 11:20:48 +08:00
parent 80c802af20
commit ca3957e3b3
12 changed files with 197 additions and 63 deletions
+1 -1
View File
@@ -3020,7 +3020,7 @@ func (profileMapper) UpdatePrivacy(tenantID types.TenantID, uid types.Uid, patch
}
func validUserPrivacyPatch(patch types.UserPrivacyPatch) bool {
if patch.AddMeMethods == nil && patch.ProfileVisibility == nil && patch.LastSeenVisibility == nil && patch.ReadReceipts == nil {
if patch.AddMeMethods == nil && patch.ProfileVisibility == nil && patch.LastSeenVisibility == nil && patch.ReadReceipts == nil && patch.GroupInviteVerification == nil {
return false
}
for method := range patch.AddMeMethods {
+3 -2
View File
@@ -12,8 +12,9 @@ const (
GroupMemberStatusActive = "active"
GroupMemberStatusLeft = "left"
GroupInvitationStatusPending = "pending"
GroupInvitationStatusJoined = "joined"
GroupInvitationStatusPending = "pending"
GroupInvitationStatusPendingApproval = "pending_approval"
GroupInvitationStatusJoined = "joined"
GroupJoinRequestStatusPending = "pending"
GroupJoinRequestStatusAccepted = "accepted"
+15 -13
View File
@@ -29,22 +29,24 @@ type UserProfilePatch struct {
}
type UserPrivacySettings struct {
UserID Uid
AddMeMethods map[string]bool
ProfileVisibility string
LastSeenVisibility string
ReadReceipts bool
Version int
CreatedAt time.Time
UpdatedAt time.Time
UserID Uid
AddMeMethods map[string]bool
ProfileVisibility string
LastSeenVisibility string
ReadReceipts bool
GroupInviteVerification bool
Version int
CreatedAt time.Time
UpdatedAt time.Time
}
type UserPrivacyPatch struct {
AddMeMethods map[string]bool
ProfileVisibility *string
LastSeenVisibility *string
ReadReceipts *bool
Version int
AddMeMethods map[string]bool
ProfileVisibility *string
LastSeenVisibility *string
ReadReceipts *bool
GroupInviteVerification *bool
Version int
}
type AppRelease struct {