From ebec95a52280980caa88b9c8cd92d69c1a7dc164 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Thu, 2 May 2024 14:43:00 +0200 Subject: [bugfix] Lock when checking/creating notifs to avoid race (#2890) * [bugfix] Lock when checking/creating notifs to avoid race * test notif spam --- internal/processing/workers/surface.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'internal/processing/workers/surface.go') diff --git a/internal/processing/workers/surface.go b/internal/processing/workers/surface.go index 09162b131..5ec905ae8 100644 --- a/internal/processing/workers/surface.go +++ b/internal/processing/workers/surface.go @@ -25,16 +25,16 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/typeutils" ) -// surface wraps functions for 'surfacing' the result +// Surface wraps functions for 'surfacing' the result // of processing a message, eg: // - timelining a status // - removing a status from timelines // - sending a notification to a user // - sending an email -type surface struct { - state *state.State - converter *typeutils.Converter - stream *stream.Processor - filter *visibility.Filter - emailSender email.Sender +type Surface struct { + State *state.State + Converter *typeutils.Converter + Stream *stream.Processor + Filter *visibility.Filter + EmailSender email.Sender } -- cgit v1.2.3