mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 11:44:56 +00:00
Add online pinging and friendship verification features
Introduces OnlinePingingController and related integration/unit tests for user online status updates. Adds PingHandlerService with memory cache throttling, IPingHandlerService interface, and service registration. Implements VerifyFriendship service and interface for friendship validation, with exception handling. Refactors CurrentUserService for improved user ID extraction and testability. Updates ChatsHub to verify friendship before messaging. Cleans up MediaController and optimizes UsersRepository queries by removing unnecessary includes.
This commit is contained in:
@@ -14,7 +14,6 @@ public class MediaController : Controller
|
||||
{
|
||||
private readonly ILogger<MediaController> _logger;
|
||||
private readonly IStorageService _storageService;
|
||||
private readonly IMediaAttachmentsRepository _repository;
|
||||
|
||||
public MediaController(ILogger<MediaController> logger, IStorageService storageService)
|
||||
{
|
||||
@@ -31,14 +30,6 @@ public class MediaController : Controller
|
||||
var url = await _storageService.SaveAsync(request.Data,request.FileName);
|
||||
var mediaId = Guid.NewGuid();
|
||||
|
||||
_repository.AddAsync(new MediaAttachments()
|
||||
{
|
||||
Id = mediaId,
|
||||
FilePath = url,
|
||||
EncryptedKey = request.EncryptedKey,
|
||||
MimeType = request.MimeType,
|
||||
Type = request.Type,
|
||||
});
|
||||
|
||||
return Ok(mediaId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user