zephyr_mirror: Fix display of personals on non-message classes.

(imported from commit 42ff030d2d78c530428dcede406d46fc71521fef)
This commit is contained in:
Tim Abbott 2012-11-27 13:27:41 -05:00
parent 30f234d42d
commit 121c3cb9c8

View file

@ -288,8 +288,16 @@ def process_notice(notice, log):
zeph["subject"] = '(instance "%s")' % (notice.instance,)
# Add instances in for instanced personals
if zeph['type'] == "private" and notice.instance.lower() != "personal":
zeph["content"] = "[-i %s]" % (notice.instance,) + "\n" + zeph["content"]
if is_personal:
if notice.cls.lower() != "message" and notice.instance.lower != "personal":
heading = "[-c %s -i %s]\n" % (notice.cls, notice.instance)
elif notice.cls.lower() != "message":
heading = "[-c %s]\n" % (notice.cls,)
elif notice.instance.lower() != "personal":
heading = "[-i %s]\n" % (notice.instance,)
else:
heading = ""
zeph["content"] = heading + zeph["content"]
zeph = decode_unicode_byte_strings(zeph)