feat(postit): separate call interfaces from text chat
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
c36b7e02c6
commit
972b1a5cce
17 changed files with 379 additions and 130 deletions
|
|
@ -163,8 +163,19 @@ namespace Yavsc.Server.Hubs
|
|||
}
|
||||
|
||||
_logger.LogInformation($"returning channel info");
|
||||
await Clients.Caller.SendAsync("joint", channelInfo);
|
||||
return channelInfo;
|
||||
var snapshot = new ChatRoomInfo
|
||||
{
|
||||
Name = channelInfo.Name,
|
||||
Topic = channelInfo.Topic,
|
||||
Users = [.. channelInfo.Users],
|
||||
Ops = [.. channelInfo.Ops],
|
||||
Hops = [.. channelInfo.Hops],
|
||||
UserNames = channelInfo.Users.Concat(channelInfo.Ops).Concat(channelInfo.Hops)
|
||||
.Select(id => _cxManager.GetUserName(id))
|
||||
.Where(name => !string.IsNullOrWhiteSpace(name)).Distinct().ToList()
|
||||
};
|
||||
await Clients.Caller.SendAsync("joint", snapshot);
|
||||
return snapshot;
|
||||
}
|
||||
|
||||
public void Register(string room)
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ namespace Yavsc
|
|||
{
|
||||
public string Name;
|
||||
public List<string> Users = new List<string>();
|
||||
public List<string>? UserNames { get; set; }
|
||||
public List<string> Ops = new List<string>();
|
||||
public List<string> Hops = new List<string>();
|
||||
public string Topic;
|
||||
|
|
|
|||
Loading…
Reference in a new issue