Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
always reply with hoptrace
Browse files Browse the repository at this point in the history
  • Loading branch information
hpk42 committed Oct 17, 2018
1 parent 4811d3f commit abfd562
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
@@ -1,4 +1,10 @@

xxx
-----

- send hop trace for all incoming media types


0.7.1
-----

Expand Down
2 changes: 1 addition & 1 deletion src/deltabot/__init__.py
@@ -1,3 +1,3 @@
#

__version__ = "0.7.1"
__version__ = "0.7.2"
13 changes: 5 additions & 8 deletions src/deltabot/cmdline.py
Expand Up @@ -85,14 +85,11 @@ def maybe_reply_to_message(self, msgid):
print ("** creating/getting chat with incoming msg", msg)
chat = self.acc.create_chat_by_message(msg)
from_addr = sender_contact.addr
if msg.view_type.is_text():
mime_msg = msg.get_mime_headers()
perf_lines = render_hop_trace(mime_msg, msg.time_sent, msg.time_received)
rtext = "\n".join(("---> " + x) for x in msg.text.splitlines())
chat.send_text(u"saw from {}: \n{}\nhop-trace:\n{}".format(from_addr, rtext, "\n".join(perf_lines)))
else:
chat.send_text(u"saw from {} viewtype: {!r}, fn={}".format(
from_addr, msg.view_type.name, msg.basename))
mime_msg = msg.get_mime_headers()
perf_lines = render_hop_trace(mime_msg, msg.time_sent, msg.time_received)
rtext = "\n".join(("---> " + x) for x in msg.text.splitlines())
chat.send_text(u"saw from {} viewtype {!r} fn={}: \n{}\nhop-trace:\n{}".format(
from_addr, msg.view_type.name, msg.basename, rtext, "\n".join(perf_lines)))
self.acc.mark_seen_messages([msg])

def dump_chats(self):
Expand Down

0 comments on commit abfd562

Please sign in to comment.