feat: support group invite privacy verification
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -12,8 +12,9 @@ const (
|
||||
GroupMemberStatusActive = "active"
|
||||
GroupMemberStatusLeft = "left"
|
||||
|
||||
GroupInvitationStatusPending = "pending"
|
||||
GroupInvitationStatusJoined = "joined"
|
||||
GroupInvitationStatusPending = "pending"
|
||||
GroupInvitationStatusPendingApproval = "pending_approval"
|
||||
GroupInvitationStatusJoined = "joined"
|
||||
|
||||
GroupJoinRequestStatusPending = "pending"
|
||||
GroupJoinRequestStatusAccepted = "accepted"
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user