diff --git a/lib/nntp/tiny/message.py b/lib/nntp/tiny/message.py index aff9f59..86de365 100644 --- a/lib/nntp/tiny/message.py +++ b/lib/nntp/tiny/message.py @@ -10,19 +10,16 @@ from nntp.tiny.db import DatabaseTable def decode(text: str): decoded = decode_header(text)[0] - if decoded[1] is None: - if decoded[0] == b'': - return '' + if decoded[0] == b'': + return '' - return str(decoded[0]) + if decoded[1] is None: + return text try: return str(decoded[0], decoded[1]) except: - if decoded[0] == b'': - return '' - - return str(decoded[0]) + return text def each_line(text: str): start = 0