Automatic Merge
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ce75debaca
Коммит
95eaf401af
@@ -322,7 +322,7 @@ func (scs *Service) syncMembershipBatchToRemotes(syncMsg *model.SyncMsg, remotes
|
|||||||
// Check if user profile needs to be synced
|
// Check if user profile needs to be synced
|
||||||
doSync, _, sErr := scs.shouldUserSync(user, syncMsg.ChannelId, rc)
|
doSync, _, sErr := scs.shouldUserSync(user, syncMsg.ChannelId, rc)
|
||||||
if sErr == nil && doSync {
|
if sErr == nil && doSync {
|
||||||
enrichedSyncMsg.Users[user.Id] = user
|
enrichedSyncMsg.Users[user.Id] = sanitizeUserForSyncSafe(user)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,6 +48,12 @@ func sanitizeUserForSync(user *model.User) *model.User {
|
|||||||
return user
|
return user
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func sanitizeUserForSyncSafe(user *model.User) *model.User {
|
||||||
|
// Create a copy to avoid modifying the original user object
|
||||||
|
userCopy := *user
|
||||||
|
return sanitizeUserForSync(&userCopy)
|
||||||
|
}
|
||||||
|
|
||||||
const MungUsernameSeparator = "-"
|
const MungUsernameSeparator = "-"
|
||||||
|
|
||||||
// mungUsername creates a new username by combining username and remote cluster name, plus
|
// mungUsername creates a new username by combining username and remote cluster name, plus
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user