Manual Cherrypick: Add audits for accessing posts without membership (#31266) (#35022)

Automatic Merge
Этот коммит содержится в:
Daniel Espino García
2026-01-26 11:23:28 +01:00
коммит произвёл GitHub
родитель 12dce033d6
Коммит 21a86506f9
79 изменённых файлов: 1707 добавлений и 1001 удалений

Просмотреть файл

@@ -149,7 +149,7 @@ func TestSharedChannelPostMetadataSync(t *testing.T) {
})
// Create a local post with priority metadata
originalPost, appErr := th.App.CreatePost(th.Context, &model.Post{
originalPost, _, appErr := th.App.CreatePost(th.Context, &model.Post{
UserId: th.BasicUser.Id,
ChannelId: testChannel.Id,
Message: "Test post with priority metadata @" + th.BasicUser2.Username,
@@ -204,7 +204,7 @@ func TestSharedChannelPostMetadataSync(t *testing.T) {
})
// Create post with acknowledgement request
originalPost, appErr := th.App.CreatePost(th.Context, &model.Post{
originalPost, _, appErr := th.App.CreatePost(th.Context, &model.Post{
UserId: th.BasicUser.Id,
ChannelId: testChannel.Id,
Message: "Test post requesting acknowledgements @" + th.BasicUser2.Username,
@@ -274,7 +274,7 @@ func TestSharedChannelPostMetadataSync(t *testing.T) {
})
// Create post with acknowledgement request
originalPost, appErr := th.App.CreatePost(th.Context, &model.Post{
originalPost, _, appErr := th.App.CreatePost(th.Context, &model.Post{
UserId: th.BasicUser.Id,
ChannelId: testChannel.Id,
Message: "Test post for ack count sync @" + th.BasicUser2.Username,
@@ -370,7 +370,7 @@ func TestSharedChannelPostMetadataSync(t *testing.T) {
})
// Create post with persistent notifications enabled
_, appErr := th.App.CreatePost(th.Context, &model.Post{
_, _, appErr := th.App.CreatePost(th.Context, &model.Post{
UserId: th.BasicUser.Id,
ChannelId: testChannel.Id,
Message: "Test post with persistent notifications @" + th.BasicUser2.Username,
@@ -535,7 +535,7 @@ func TestSharedChannelPostMetadataSync(t *testing.T) {
// STEP 1: Server A creates a post with acknowledgement request
t.Log("=== STEP 1: Server A creates post with ack request ===")
originalPost, appErr := th.App.CreatePost(th.Context, &model.Post{
originalPost, _, appErr := th.App.CreatePost(th.Context, &model.Post{
UserId: th.BasicUser.Id,
ChannelId: testChannel.Id,
Message: "Cross-cluster ack test - please acknowledge",