Skip to content

Commit f55e596

Browse files
author
Jeff
committed
black
1 parent ba4f966 commit f55e596

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sogs/utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,19 @@
88
import json
99
from typing import Union, Tuple
1010

11+
1112
def parse_message(data: bytes):
1213
"""given a bunch of bytes for a protobuf message return the entire parsed message"""
1314
msg = protobuf.Content()
1415
msg.ParseFromString(remove_session_message_padding(data))
1516
return msg
1617

18+
1719
def message_body(data: bytes):
1820
"""given a bunch of bytes for a protobuf message return the message's body"""
1921
return parse_message(data).body
2022

23+
2124
def encode_base64(data: bytes):
2225
return base64.b64encode(data).decode()
2326

0 commit comments

Comments
 (0)