~emersion/gamja

51883292f940ffbe8c33e457d0be3ca95420c6c0 — Simon Ser 24 days ago 5b53fb6
lib/client: fix caps with equal sign in value

CAP=a=b wouldn't parse correctly.
1 files changed, 6 insertions(+), 6 deletions(-)

M lib/client.js
M lib/client.js => lib/client.js +6 -6
@@ 354,13 354,13 @@ export default class Client extends EventTarget {
	addAvailableCaps(s) {
		let l = s.split(" ");
		l.forEach((s) => {
			let parts = s.split("=");
			let k = parts[0].toLowerCase();
			let v = "";
			if (parts.length > 1) {
				v = parts[1];
			let i = s.indexOf("=");
			let k = s, v = "";
			if (i >= 0) {
				k = s.slice(0, i);
				v = s.slice(i + 1);
			}
			this.availableCaps[k] = v;
			this.availableCaps[k.toLowerCase()] = v;
		});
	}