🐛 Fix missing file permission creation

This commit is contained in:
2026-01-12 19:32:50 +08:00
parent 7085f43e54
commit c11bf579c4
12 changed files with 158 additions and 3 deletions

View File

@@ -229,12 +229,16 @@ public class AccountService(
{
var file = await files.GetFileAsync(new GetFileRequest { Id = pictureId });
account.Profile.Picture = SnCloudFileReferenceObject.FromProtoValue(file);
await files.SetFilePublicAsync(new SetFilePublicRequest { FileId = pictureId });
}
if (!string.IsNullOrEmpty(backgroundId))
{
var file = await files.GetFileAsync(new GetFileRequest { Id = backgroundId });
account.Profile.Background = SnCloudFileReferenceObject.FromProtoValue(file);
await files.SetFilePublicAsync(new SetFilePublicRequest { FileId = backgroundId });
}
db.Accounts.Add(account);