Fix bug in relay subscriptions
This commit is contained in:
parent
c850984a3b
commit
29424383de
|
@ -64,8 +64,8 @@ class Relay(Protocol):
|
||||||
self.sendErr("SUBSCRIBED")
|
self.sendErr("SUBSCRIBED")
|
||||||
return
|
return
|
||||||
self.subscriptions.append(i)
|
self.subscriptions.append(i)
|
||||||
self.sendMsg({"type": "success"})
|
self.sendMsg({"type": "success"})
|
||||||
return
|
return
|
||||||
|
|
||||||
def handleUnubscribe(self, lst):
|
def handleUnubscribe(self, lst):
|
||||||
if not isinstance(lst, list):
|
if not isinstance(lst, list):
|
||||||
|
@ -78,9 +78,9 @@ class Relay(Protocol):
|
||||||
if not i in self.subscriptions:
|
if not i in self.subscriptions:
|
||||||
self.sendErr("NOTSUBSCRIBED")
|
self.sendErr("NOTSUBSCRIBED")
|
||||||
return
|
return
|
||||||
del self.subscriptions[i]
|
del self.subscriptions[i]
|
||||||
self.sendMsg({"type": "success"})
|
self.sendMsg({"type": "success"})
|
||||||
return
|
return
|
||||||
|
|
||||||
def handleHello(self, parsed):
|
def handleHello(self, parsed):
|
||||||
if parsed["key"] in main.tokens.keys():
|
if parsed["key"] in main.tokens.keys():
|
||||||
|
|
Loading…
Reference in New Issue