Skip to content

Commit

Permalink
Remove old fallback and never process plain text body for mentions
Browse files Browse the repository at this point in the history
  • Loading branch information
hifi committed Aug 15, 2022
1 parent d4c9036 commit c4dcf97
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions heisenbridge/private_room.py
Expand Up @@ -684,15 +684,7 @@ async def _process_event_content(self, event, prefix, reply_to=None):
if content.formatted_body:
lines = str(await self.parser.parse(content.formatted_body)).split("\n")
elif content.body:
body = content.body

for user_id, displayname in self.displaynames.items():
body = body.replace(user_id, displayname)

# FluffyChat prefixes mentions in fallback with @
body = body.replace("@" + displayname, displayname)

lines = body.split("\n")
lines = content.body.split("\n")
else:
logging.warning("_process_event_content called with no usable body")
return
Expand Down

0 comments on commit c4dcf97

Please sign in to comment.