feat(irc): set channel pass on indexer add (#1473)

* feat(irc): set channel pass on creation

* fix: missing semicolons
This commit is contained in:
ze0s 2024-03-24 11:28:04 +01:00 committed by GitHub
parent be0948fb2e
commit 67980776b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -370,12 +370,17 @@ export function IndexerAddForm({ isOpen, toggle }: AddProps) {
} else if (formData.implementation === "irc") {
const channels: IrcChannel[] = [];
if (ind.irc?.channels.length) {
let channelPass = "";
if (formData.channels?.password !== "") {
channelPass = formData.channels.password;
}
ind.irc.channels.forEach(element => {
channels.push({
id: 0,
enabled: true,
name: element,
password: "",
password: channelPass,
detached: false,
monitoring: false
});