remove echo-message considerations from line_handler/message.py

This commit is contained in:
jesopo 2019-06-21 10:47:21 +01:00
parent 032c67be66
commit 1f2817c366

View file

@ -1,20 +1,13 @@
from src import utils
def _from_self(server, direction, source):
if direction == utils.Direction.Send:
if server.has_capability_str("echo-message"):
return None
else:
return True
def _from_self(server, source):
if source:
return server.is_own_nickname(source.nickname)
else:
if source:
return server.is_own_nickname(source.nickname)
else:
return False
return False
def message(events, event):
from_self = _from_self(event["server"], event["direction"],
event.get("source", None))
from_self = _from_self(event["server"], event.get("source", None))
if from_self == None:
return