From f62fc8c2a1722454dccc628f495b856daa109fc1 Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 27 Nov 2019 15:16:46 +0000 Subject: show username when a toot is CWed --- modules/fediverse/__init__.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'modules/fediverse/__init__.py') diff --git a/modules/fediverse/__init__.py b/modules/fediverse/__init__.py index f80607d3..384d1e9f 100644 --- a/modules/fediverse/__init__.py +++ b/modules/fediverse/__init__.py @@ -97,20 +97,19 @@ class Module(ModuleManager.BaseModule): type = note["type"] note = note["object"] - cw, out, url = ap_utils.format_note(actor, note, type) + cw, author, content, url = ap_utils.parse_note(actor, note, type) shorturl = self.exports.get_one("shorturl")(event["server"], url, context=event["target"]) if cw: if strict_cw: - out = "CW: %s - %s" % (cw, shorturl) + out = "%s: CW %s - %s" % (author, cw, shorturl) else: - out = "(CW %s) %s - %s" % (cw, out, shorturl) + out = "(CW %s) %s: %s - %s" % (cw, author, content, shorturl) else: - out = "%s - %s" % (out, shorturl) + out = "%s: %s - %s" % (author, content, shorturl) event["stdout"].write(out) - def _get_from_outbox(self, username, instance): try: actor_url = ap_utils.find_actor(username, instance) -- cgit v1.3.1-10-gc9f91