[backend/masto-client] Fix missing replyInaccessible marker
This commit is contained in:
parent
9de6d15a0c
commit
76a3f94fe8
1 changed files with 18 additions and 18 deletions
|
@ -112,6 +112,23 @@ public class NoteRenderer(
|
||||||
_ => MfmInlineMedia.MediaType.Other
|
_ => MfmInlineMedia.MediaType.Other
|
||||||
}, p.RemoteUrl ?? p.Url, p.Description)).ToList();
|
}, p.RemoteUrl ?? p.Url, p.Description)).ToList();
|
||||||
|
|
||||||
|
var filters = data?.Filters ?? await GetFiltersAsync(user, filterContext);
|
||||||
|
|
||||||
|
List<FilterResultEntity> filterResult;
|
||||||
|
if (filters.Count > 0 && filterContext == null)
|
||||||
|
{
|
||||||
|
var filtered = FilterHelper.CheckFilters([note, note.Reply, note.Renote, note.Renote?.Renote], filters);
|
||||||
|
filterResult = GetFilterResult(filtered);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var filtered = FilterHelper.IsFiltered([note, note.Reply, note.Renote, note.Renote?.Renote], filters);
|
||||||
|
filterResult = GetFilterResult(filtered.HasValue ? [filtered.Value] : []);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((user?.UserSettings?.FilterInaccessible ?? false) && (replyInaccessible || quoteInaccessible))
|
||||||
|
filterResult.Insert(0, InaccessibleFilter);
|
||||||
|
|
||||||
var cw = note.Cw;
|
var cw = note.Cw;
|
||||||
if (replyInaccessible && !string.IsNullOrEmpty(cw))
|
if (replyInaccessible && !string.IsNullOrEmpty(cw))
|
||||||
{
|
{
|
||||||
|
@ -145,23 +162,6 @@ public class NoteRenderer(
|
||||||
? (data?.Polls ?? await GetPollsAsync([note], user)).FirstOrDefault(p => p.Id == note.Id)
|
? (data?.Polls ?? await GetPollsAsync([note], user)).FirstOrDefault(p => p.Id == note.Id)
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
var filters = data?.Filters ?? await GetFiltersAsync(user, filterContext);
|
|
||||||
|
|
||||||
List<FilterResultEntity> filterResult;
|
|
||||||
if (filters.Count > 0 && filterContext == null)
|
|
||||||
{
|
|
||||||
var filtered = FilterHelper.CheckFilters([note, note.Reply, note.Renote, note.Renote?.Renote], filters);
|
|
||||||
filterResult = GetFilterResult(filtered);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var filtered = FilterHelper.IsFiltered([note, note.Reply, note.Renote, note.Renote?.Renote], filters);
|
|
||||||
filterResult = GetFilterResult(filtered.HasValue ? [filtered.Value] : []);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((user?.UserSettings?.FilterInaccessible ?? false) && (replyInaccessible || quoteInaccessible))
|
|
||||||
filterResult.Insert(0, InaccessibleFilter);
|
|
||||||
|
|
||||||
var res = new StatusEntity
|
var res = new StatusEntity
|
||||||
{
|
{
|
||||||
Id = note.Id,
|
Id = note.Id,
|
||||||
|
@ -185,7 +185,7 @@ public class NoteRenderer(
|
||||||
IsBookmarked = bookmarked,
|
IsBookmarked = bookmarked,
|
||||||
IsMuted = muted,
|
IsMuted = muted,
|
||||||
IsSensitive = sensitive,
|
IsSensitive = sensitive,
|
||||||
ContentWarning = note.Cw ?? "",
|
ContentWarning = cw ?? "",
|
||||||
Visibility = StatusEntity.EncodeVisibility(note.Visibility),
|
Visibility = StatusEntity.EncodeVisibility(note.Visibility),
|
||||||
Content = content,
|
Content = content,
|
||||||
Text = text,
|
Text = text,
|
||||||
|
|
Loading…
Add table
Reference in a new issue