Skip to content

Commit

Permalink
Update handler.network.cap.available on CAP NEW/DEL
Browse files Browse the repository at this point in the history
  • Loading branch information
progval committed Sep 4, 2022
1 parent cae2d67 commit 46ef4fb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/commands/handlers/registration.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const handlers = {
const sep = cap.indexOf('=');
if (sep === -1) {
capability_values[cap] = '';
if (command.params[1] === 'LS') {
if (command.params[1] === 'LS' || command.params[1] === 'NEW') {
handler.network.cap.available.set(cap, '');
}
return cap;
Expand All @@ -124,7 +124,7 @@ const handlers = {
const cap_value = cap.substr(sep + 1);

capability_values[cap_name] = cap_value;
if (command.params[1] === 'LS') {
if (command.params[1] === 'LS' || command.params[1] === 'NEW') {
handler.network.cap.available.set(cap_name, cap_value);
}
return cap_name;
Expand Down Expand Up @@ -256,6 +256,7 @@ const handlers = {
handler.network.cap.enabled,
capabilities
);
handler.network.cap.available.delete(cap_name);
break;
}

Expand Down

0 comments on commit 46ef4fb

Please sign in to comment.