This commit is contained in:
parent
47378451b3
commit
eb70ce0ccb
3 changed files with 33 additions and 27 deletions
|
@ -1,4 +1,5 @@
|
||||||
using Iceshrimp.Backend.Controllers.Mastodon.Schemas.Entities;
|
using Iceshrimp.Backend.Controllers.Mastodon.Schemas.Entities;
|
||||||
|
using Iceshrimp.Backend.Controllers.Pleroma.Schemas.Entities;
|
||||||
using Iceshrimp.Backend.Core.Configuration;
|
using Iceshrimp.Backend.Core.Configuration;
|
||||||
using Iceshrimp.Backend.Core.Database;
|
using Iceshrimp.Backend.Core.Database;
|
||||||
using Iceshrimp.Backend.Core.Database.Tables;
|
using Iceshrimp.Backend.Core.Database.Tables;
|
||||||
|
@ -77,7 +78,12 @@ public class UserRenderer(
|
||||||
IsDiscoverable = user.IsExplorable,
|
IsDiscoverable = user.IsExplorable,
|
||||||
Fields = fields?.ToList() ?? [],
|
Fields = fields?.ToList() ?? [],
|
||||||
Emoji = profileEmoji,
|
Emoji = profileEmoji,
|
||||||
Pleroma = flags.IsPleroma.Value ? user.Pleroma : null
|
Pleroma = flags.IsPleroma.Value
|
||||||
|
? new PleromaUserExtensions()
|
||||||
|
{
|
||||||
|
IsAdmin = user.IsAdmin,
|
||||||
|
IsModerator = user.IsModerator
|
||||||
|
} : null
|
||||||
};
|
};
|
||||||
|
|
||||||
if (localUser is null && security.Value.PublicPreview == Enums.PublicPreview.RestrictedNoMedia) //TODO
|
if (localUser is null && security.Value.PublicPreview == Enums.PublicPreview.RestrictedNoMedia) //TODO
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class AccountEntity : IIdentifiable
|
||||||
[J("emojis")] public required List<EmojiEntity> Emoji { get; set; }
|
[J("emojis")] public required List<EmojiEntity> Emoji { get; set; }
|
||||||
[J("id")] public required string Id { get; set; }
|
[J("id")] public required string Id { get; set; }
|
||||||
[J("last_status_at")] public string? LastStatusAt { get; set; }
|
[J("last_status_at")] public string? LastStatusAt { get; set; }
|
||||||
[J("pleroma")] public required PleromaStatusExtensions? Pleroma { get; set; }
|
[J("pleroma")] public required PleromaUserExtensions? Pleroma { get; set; }
|
||||||
|
|
||||||
[J("avatar_description")] public required string AvatarDescription { get; set; }
|
[J("avatar_description")] public required string AvatarDescription { get; set; }
|
||||||
[J("header_description")] public required string HeaderDescription { get; set; }
|
[J("header_description")] public required string HeaderDescription { get; set; }
|
||||||
|
|
|
@ -628,7 +628,7 @@ public class User : IIdentifiable
|
||||||
: throw new Exception("Cannot access PublicUrl for remote user");
|
: throw new Exception("Cannot access PublicUrl for remote user");
|
||||||
|
|
||||||
[Projectable] public string PublicUrlPath => $"/@{Username}";
|
[Projectable] public string PublicUrlPath => $"/@{Username}";
|
||||||
public PleromaStatusExtensions? Pleroma { get; set; }
|
public PleromaUserExtensions? Pleroma { get; set; }
|
||||||
|
|
||||||
public string GetIdenticonUrl(string webDomain) => $"https://{webDomain}{IdenticonUrlPath}";
|
public string GetIdenticonUrl(string webDomain) => $"https://{webDomain}{IdenticonUrlPath}";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue