group and channel name can't be null

This commit is contained in:
2025-07-08 10:53:54 +03:30
parent f97a154869
commit b03569c1b7
4 changed files with 50 additions and 14 deletions
@@ -559,7 +559,7 @@ public class GroupDatabase {
public static boolean transferOwnership(UUID groupId, UUID newOwnerId) {
String demoteOldOwner = "UPDATE group_members SET role = 'admin' WHERE group_id = ? AND role = 'owner'";
String promoteNewOwner = "UPDATE group_members SET role = 'owner' WHERE group_id = ? AND user_id = ?";
String promoteNewOwner = "UPDATE group_members SET role = 'owner', permissions = '{}'::jsonb WHERE group_id = ? AND user_id = ?";
try (Connection conn = ConnectionDb.connect()) {
conn.setAutoCommit(false);