Decode base64 encoded messages before posting
This is needed to unscramble the encoded string, otherwise we won't be able to find the thread id or message. Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
parent
3a8b556dcc
commit
49d5be8a76
|
@ -26,10 +26,12 @@ if addr.replace(".", "") != slack.user().email().replace(".", ""):
|
|||
if headers.is_multipart():
|
||||
for part in headers.get_payload():
|
||||
if part.get_content_type() == "text/plain":
|
||||
payload = part.get_payload()
|
||||
payload = part.get_payload(decode = True)
|
||||
else:
|
||||
payload = headers.get_payload()
|
||||
payload = headers.get_payload(decode = True)
|
||||
|
||||
if type(payload) is bytes:
|
||||
payload = payload.decode()
|
||||
|
||||
#
|
||||
# Find the thread id in the message payload
|
||||
|
|
Loading…
Reference in New Issue