handle 'CAP DEL' for something that wasn't advertised

This commit is contained in:
jesopo 2019-07-28 20:55:34 +01:00
parent a0efd7c0c7
commit c99cbaf118

View file

@ -79,6 +79,7 @@ def cap(exports, events, event):
if subcommand == "DEL": if subcommand == "DEL":
for capability in capabilities.keys(): for capability in capabilities.keys():
event["server"].agreed_capabilities.discard(capability) event["server"].agreed_capabilities.discard(capability)
if capability and event["server"].server_capabilities:
del event["server"].server_capabilities[capability] del event["server"].server_capabilities[capability]
events.on("received.cap.del").call(server=event["server"], events.on("received.cap.del").call(server=event["server"],