Skip to content

Conversation

@H-Shay
Copy link
Contributor

@H-Shay H-Shay commented Oct 1, 2024

No description provided.

@H-Shay H-Shay requested a review from turt2live October 1, 2024 19:15
Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall this lgtm - while reviewing it occurred to me we might be able to handle weird future cases as well with some JSON trickery.

@H-Shay H-Shay requested a review from turt2live October 1, 2024 22:13
Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise lgtm, I think.

const msgtype = content['msgtype'] || 'm.text';
const isMedia = msgtype === 'm.image';
let content = JSON.stringify(event['content']);
content = content.replace(/"|{|}/g, '')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could do with a comment for what it's fixing about the input (I'm not sure myself).

@H-Shay H-Shay requested a review from turt2live October 1, 2024 22:25
@H-Shay H-Shay merged commit 74d2c9b into main Oct 1, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants