mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 21:36:30 +00:00
fix queue, fix ai email and role set
This commit is contained in:
@@ -82,7 +82,7 @@ public class AnnotationService : INotificationHandler<AnnotationsDeletedEvent>
|
||||
return Task.CompletedTask;
|
||||
}, SaveTaskId, TimeSpan.FromSeconds(5), cancellationToken);
|
||||
|
||||
if (msg.CreatedRole != RoleEnum.Operator) //Process only operator's messages
|
||||
if (msg.CreatedEmail == _authProvider.CurrentUser.Email) //Don't process messages by yourself
|
||||
return;
|
||||
|
||||
await SaveAnnotationInner(
|
||||
@@ -106,7 +106,7 @@ public class AnnotationService : INotificationHandler<AnnotationsDeletedEvent>
|
||||
{
|
||||
a.Time = TimeSpan.FromMilliseconds(a.Milliseconds);
|
||||
return await SaveAnnotationInner(DateTime.Now, a.OriginalMediaName, a.Time, ".jpg", a.Detections.ToList(),
|
||||
a.Source, new MemoryStream(a.Image), a.CreatedRole, a.CreatedEmail, generateThumbnail: true, cancellationToken);
|
||||
a.Source, new MemoryStream(a.Image), _authProvider.CurrentUser.Role, _authProvider.CurrentUser.Email, generateThumbnail: true, cancellationToken);
|
||||
}
|
||||
|
||||
//Manual
|
||||
|
||||
Reference in New Issue
Block a user