Added checks for non-user foreign keys in stores. Load/Saving stores' order is now based on table dependencies. Added ability to use chat message when using redemption.
This commit is contained in:
@ -22,7 +22,7 @@ namespace HermesSocketServer.Requests
|
||||
if (result)
|
||||
{
|
||||
var permissions = channel.GroupPermissions.Get().Values
|
||||
.Where(p => p.GroupId == groupId);
|
||||
.Where(p => p.GroupId.ToString() == groupId);
|
||||
|
||||
Task? chattersSave = null;
|
||||
if (channel.Groups.Chatters.TryGetValue(groupId, out var chatters))
|
||||
@ -32,7 +32,7 @@ namespace HermesSocketServer.Requests
|
||||
{
|
||||
foreach (var chatter in filteredChatters)
|
||||
{
|
||||
var res = chatters.Remove(chatter.ChatterId.ToString());
|
||||
var res = chatters.Remove(chatter.ChatterId.ToString(), fromCascade: true);
|
||||
if (!res)
|
||||
_logger.Warning($"Failed to delete group chatter by id [group chatter id: {chatter.ChatterId}]");
|
||||
}
|
||||
@ -43,7 +43,7 @@ namespace HermesSocketServer.Requests
|
||||
|
||||
foreach (var permission in permissions)
|
||||
{
|
||||
var res = channel.GroupPermissions.Remove(permission.Id);
|
||||
var res = channel.GroupPermissions.Remove(permission.Id, fromCascade: true);
|
||||
if (!res)
|
||||
_logger.Warning($"Failed to delete group permission by id [group chatter id: {permission.Id}]");
|
||||
}
|
||||
|
Reference in New Issue
Block a user