remove echo-message considerations from line_handler/message.py
This commit is contained in:
parent
032c67be66
commit
1f2817c366
1 changed files with 5 additions and 12 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue