[backend] Fix build
This commit is contained in:
parent
f1e5200c6a
commit
f3488fdca3
2 changed files with 6 additions and 2 deletions
|
@ -26,7 +26,7 @@ public class NoteModel(
|
|||
public string? QuoteUrl;
|
||||
public bool ShowMedia = security.Value.PublicPreview > Enums.PublicPreview.RestrictedNoMedia;
|
||||
public bool ShowRemoteReplies = security.Value.PublicPreview > Enums.PublicPreview.Restricted;
|
||||
public string InstanceName = await meta.Get(MetaEntity.InstanceName) ?? "Iceshrimp.NET";
|
||||
public string InstanceName = "Iceshrimp.NET";
|
||||
|
||||
public Dictionary<string, string> TextContent = new();
|
||||
|
||||
|
@ -42,6 +42,8 @@ public class NoteModel(
|
|||
throw GracefulException.Forbidden("Public preview is disabled on this instance.",
|
||||
"The instance administrator has intentionally disabled this feature for privacy reasons.");
|
||||
|
||||
InstanceName = await meta.Get(MetaEntity.InstanceName) ?? InstanceName;
|
||||
|
||||
//TODO: redirect to login (with route as url param) when public preview is disabled
|
||||
//TODO: login button
|
||||
//TODO: thread view (respect public preview settings - don't show remote replies if set to restricted or lower)
|
||||
|
|
|
@ -24,7 +24,7 @@ public class UserModel(
|
|||
public new User? User;
|
||||
public string? Bio;
|
||||
public bool ShowMedia = security.Value.PublicPreview > Enums.PublicPreview.RestrictedNoMedia;
|
||||
public string InstanceName = await meta.Get(MetaEntity.InstanceName) ?? "Iceshrimp.NET";
|
||||
public string InstanceName = "Iceshrimp.NET";
|
||||
|
||||
[SuppressMessage("ReSharper", "EntityFramework.NPlusOne.IncompleteDataQuery",
|
||||
Justification = "IncludeCommonProperties")]
|
||||
|
@ -38,6 +38,8 @@ public class UserModel(
|
|||
throw GracefulException.Forbidden("Public preview is disabled on this instance.",
|
||||
"The instance administrator has intentionally disabled this feature for privacy reasons.");
|
||||
|
||||
InstanceName = await meta.Get(MetaEntity.InstanceName) ?? InstanceName;
|
||||
|
||||
//TODO: login button
|
||||
//TODO: user note view (respect public preview settings - don't show renotes of remote notes if set to restricted or lower)
|
||||
//TODO: emoji
|
||||
|
|
Loading…
Add table
Reference in a new issue