You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In parse() all data messages are checked for attachments, but not sync messages.
If I look in the raw envelope of a sync message, one which contains an attachment, I will see the attachments but only their file names and no base64 string.
Is there some issue with sync messages and attachments? I have no idea what the difference is between the two message tyoes.
The text was updated successfully, but these errors were encountered:
Ok, I think I see, it looks like its just a matter of adding _parse_attachments to sync messages in parse, like below. Is there a reason this shouldnt be done?
if "syncMessage" in raw_message["envelope"]:
type = MessageType.SYNC_MESSAGE
text = cls._parse_sync_message(raw_message["envelope"]["syncMessage"])
group = cls._parse_group_information(
raw_message["envelope"]["syncMessage"]["sentMessage"]
)
reaction = cls._parse_reaction(
raw_message["envelope"]["syncMessage"]["sentMessage"]
)
mentions = cls._parse_mentions(
raw_message["envelope"]["syncMessage"]["sentMessage"]
)
base64_attachments = await cls._parse_attachments(
signal, raw_message["envelope"]["syncMessage"]["sentMessage"]
)
attachments_local_filenames = cls._parse_attachments_local_filenames(
raw_message["envelope"]["syncMessage"]["sentMessage"]
)
Sorry about that, I didn't take into account the sync messages when implementing the feature. I won't be able to fix this in the next few weeks so feel free to make a PR if you cannot wait.
In
parse()
all data messages are checked for attachments, but not sync messages.If I look in the raw envelope of a sync message, one which contains an attachment, I will see the attachments but only their file names and no base64 string.
Is there some issue with sync messages and attachments? I have no idea what the difference is between the two message tyoes.
The text was updated successfully, but these errors were encountered: