mirror of
https://github.com/Govor-team/Govor.git
synced 2026-11-16 20:56:03 +00:00
2e9d7e625e
Adds server-side group and channel management, private invitations, member moderation, avatar handling, and required-channel configuration. This change also introduces SignalR group profile/member notifications, updates registration to atomically join required channels, and adds EF migration and test coverage for group membership, permissions, and invitation expiry rules.
26 lines
622 B
C#
26 lines
622 B
C#
using Govor.Domain;
|
|
using Govor.Domain.Models;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace Govor.Application.Groups;
|
|
|
|
public class UserGroupsGetterService : IUserGroupsGetterService
|
|
{
|
|
private readonly GovorDbContext _context;
|
|
|
|
public UserGroupsGetterService(GovorDbContext context)
|
|
{
|
|
_context = context;
|
|
}
|
|
|
|
public async Task<List<ChatGroup>> GetUserGroupsAsync(Guid userId)
|
|
{
|
|
return await _context.GroupMemberships
|
|
.AsNoTracking()
|
|
.Where(m => m.UserId == userId && !m.IsBanned)
|
|
.Select(m => m.ChatGroup)
|
|
.ToListAsync();
|
|
}
|
|
|
|
}
|