Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment fixes #1143

Merged
merged 11 commits into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private sealed class DelegatedPipelineStageDefinition<TInput, TOutput>(
string operatorName,
Func<IBsonSerializer<TInput>,
RenderedPipelineStageDefinition<TOutput>> renderer)
: PipelineStageDefinition<TInput, TOutput>
: PipelineStageDefinition<TInput, TOutput>
{
public override string OperatorName { get; } = operatorName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ await currentManager.UpdateDocAsync(notificationsContext, doc =>
var commentValue = new Comment(clock.GetCurrentInstant(), actor, text, url, skipHandlers);
var commentJson = jsonSerializer.Serialize(commentValue);

stream.InsertRange(transaction, stream.Length, InputFactory.FromJson(commentJson));
stream.InsertRange(transaction, stream.Length(transaction), InputFactory.FromJson(commentJson));
}
}, ct);
}
Expand Down Expand Up @@ -157,7 +157,7 @@ await @event.Source.UpdateDocAsync(@event.Context, (doc) =>
var eventBody = Envelope.Create<IEvent>(commentEvent);
var eventData = eventFormatter.ToEventData(eventBody, Guid.NewGuid());

await eventStore.AppendAsync(Guid.NewGuid(), streamName, EtagVersion.Any, new List<EventData> { eventData });
await eventStore.AppendAsync(Guid.NewGuid(), streamName, EtagVersion.Any, [eventData]);

foreach (var mentionedUser in commentEvent.Mentions.OrEmpty())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@
<PackageReference Include="Notifo.SDK" Version="1.7.5" />
<PackageReference Include="RefactoringEssentials" Version="5.6.0" PrivateAssets="all" />
<PackageReference Include="Squidex.CLI.Core" Version="13.6.0" />
<PackageReference Include="Squidex.YDotNet.Extensions" Version="0.2.9" />
<PackageReference Include="Squidex.YDotNet.Server" Version="0.2.9" />
<PackageReference Include="YDotNet" Version="0.4.1" />
<PackageReference Include="YDotNet.Extensions" Version="0.4.1" />
<PackageReference Include="YDotNet.Server" Version="0.4.1" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
<PackageReference Include="System.Collections.Immutable" Version="8.0.0" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ namespace Squidex.Areas.Api.Controllers.Assets;
public sealed class AssetsController(
ICommandBus commandBus,
IAssetQueryService assetQuery,
IAssetUsageTracker assetUsageTracker,
ITagService tagService,
AssetTusRunner assetTusRunner)
: ApiController(commandBus)
Expand Down
4 changes: 3 additions & 1 deletion backend/src/Squidex/Pipeline/Squid/SquidMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@

namespace Squidex.Pipeline.Squid;

#pragma warning disable CS9113 // Parameter is unread.
public sealed class SquidMiddleware(RequestDelegate next)
#pragma warning restore CS9113 // Parameter is unread.
{
private readonly string squidHappyLG = LoadSvg("happy");
private readonly string squidHappySM = LoadSvg("happy-sm");
Expand Down Expand Up @@ -97,7 +99,7 @@ void Replace(string source, string value)

context.Response.StatusCode = 200;
context.Response.ContentType = "image/svg+xml";
context.Response.Headers["Cache-Control"] = "public, max-age=604800";
context.Response.Headers.CacheControl = "public, max-age=604800";

await context.Response.WriteAsync(svg, context.RequestAborted);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="NodaTime.Serialization.JsonNet" Version="3.1.0" />
<PackageReference Include="Squidex.YDotNet.Native" Version="0.2.9" />
<PackageReference Include="YDotNet.Native" Version="0.4.1" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
<PackageReference Include="System.Reactive.Linq" Version="6.0.1" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public sealed class MyEventConsumerProcessor(
IEventFormatter eventFormatter,
IEventStore eventStore,
ILogger<EventConsumerProcessor> log)
: EventConsumerProcessor(persistenceFactory, eventConsumer, eventFormatter, eventStore, log)
: EventConsumerProcessor(persistenceFactory, eventConsumer, eventFormatter, eventStore, log)
{
public IEventSubscriber<StoredEvent>? Subscriber { get; set; }

Expand Down
Loading