[backend/masto-client] Set sensitive flag on drive files when posting sensitive status (ISH-292)
This commit is contained in:
parent
df1c8e5475
commit
21c042453c
1 changed files with 6 additions and 0 deletions
|
@ -389,6 +389,12 @@ public class StatusController(
|
||||||
newText = MfmSerializer.Serialize(parsed).Trim();
|
newText = MfmSerializer.Serialize(parsed).Trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (request is { Sensitive: true, MediaIds.Count: > 0 })
|
||||||
|
{
|
||||||
|
await db.DriveFiles.Where(p => request.MediaIds.Contains(p.Id) && !p.IsSensitive)
|
||||||
|
.ExecuteUpdateAsync(p => p.SetProperty(i => i.IsSensitive, _ => true));
|
||||||
|
}
|
||||||
|
|
||||||
var quote = request.QuoteId != null
|
var quote = request.QuoteId != null
|
||||||
? await db.Notes
|
? await db.Notes
|
||||||
.IncludeCommonProperties()
|
.IncludeCommonProperties()
|
||||||
|
|
Loading…
Add table
Reference in a new issue