Added saving to channel removal.
This commit is contained in:
parent
f159708fa2
commit
66224c63d4
|
@ -36,6 +36,8 @@ public class RemoveChannelCommand implements ServerCliCommand {
|
||||||
}
|
}
|
||||||
server.getChannelManager().removeChannel(channelToRemove);
|
server.getChannelManager().removeChannel(channelToRemove);
|
||||||
server.getDb().getContext().dropCollection(channelToRemove.getMessageCollection().getName());
|
server.getDb().getContext().dropCollection(channelToRemove.getMessageCollection().getName());
|
||||||
|
server.getConfig().getChannels().removeIf(channelConfig -> channelConfig.getName().equals(channelToRemove.getName()));
|
||||||
|
server.getConfig().save();
|
||||||
server.broadcast(server.getMetaData());
|
server.broadcast(server.getMetaData());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue