fix cap negotation

This commit is contained in:
emerson 2021-12-07 10:37:07 -05:00
parent 1af94c40b2
commit 888bc53cb8
No known key found for this signature in database
GPG key ID: 270669502DA603E3

View file

@ -138,7 +138,7 @@ export class Client {
const capsToChange = (message.params[1].indexOf(' ') === -1) ? [message.params[1]] : message.params[1].split(' '); const capsToChange = (message.params[1].indexOf(' ') === -1) ? [message.params[1]] : message.params[1].split(' ');
const capsEnabled: string[] = []; const capsEnabled: string[] = [];
capsToChange.forEach(cap => { capsToChange.forEach(cap => {
if (this.allCaps.get(cap)) { if (this.allCaps.has(cap)) {
this.enabledCaps.set(cap, ''); this.enabledCaps.set(cap, '');
capsEnabled.push(cap); capsEnabled.push(cap);
} }