Skip to content

fix: send edited message with error type as regular one#1664

Merged
khushal87 merged 2 commits intomasterfrom
fix/send-edited-message-with-error-type
Dec 16, 2025
Merged

fix: send edited message with error type as regular one#1664
khushal87 merged 2 commits intomasterfrom
fix/send-edited-message-with-error-type

Conversation

@khushal87
Copy link
Member

CLA

  • I have signed the Stream CLA (required).
  • Code changes are tested

Description of the changes, What, Why and How?

Changelog

@github-actions
Copy link
Contributor

github-actions bot commented Dec 11, 2025

Size Change: +80 B (+0.02%)

Total Size: 356 kB

Filename Size Change
dist/cjs/index.browser.js 119 kB +27 B (+0.02%)
dist/cjs/index.node.js 120 kB +26 B (+0.02%)
dist/esm/index.mjs 118 kB +27 B (+0.02%)

compressed-size-action

Comment on lines 18 to 22
Copy link
Contributor

@MartinCupela MartinCupela Dec 11, 2025

Choose a reason for hiding this comment

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

Suggested change
const messageType = composer.editedMessage?.type ?? 'regular';
const isErrorMessage = messageType === 'error';
const common = {
type: composer.editedMessage?.type ?? 'regular',
type: isErrorMessage ? 'regular' : messageType,
const common = {
type: !composer.editedMessage?.type || composer.editedMessage.type === 'error' ? 'regular' : composer.editedMessage.type,

Copy link
Member Author

Choose a reason for hiding this comment

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

Aren't they the same just not in one line? 😅

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes

Copy link
Member Author

Choose a reason for hiding this comment

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

I would have preferred shorter conditionals but okay if you want me to do it, I can push your suggestion.

Copy link
Contributor

Choose a reason for hiding this comment

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

I will let you decide

Copy link
Member Author

Choose a reason for hiding this comment

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

In that case, I will keep the shorter one. :)

Copy link
Contributor

Choose a reason for hiding this comment

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

The shorter one is my suggestion if you count lines, so not sure, which you take :)

Copy link
Contributor

Choose a reason for hiding this comment

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

I have even shortened more now

Copy link
Member Author

Choose a reason for hiding this comment

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

Pushed your suggestion

Copy link
Member Author

@khushal87 khushal87 Dec 11, 2025

Choose a reason for hiding this comment

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

By shorter I meant not making the condition long. This is by having different boolean vars, but okay either way it is fine. I have pushed your suggestion.

@khushal87 khushal87 merged commit 547cd2f into master Dec 16, 2025
4 checks passed
@khushal87 khushal87 deleted the fix/send-edited-message-with-error-type branch December 16, 2025 07:03
github-actions bot pushed a commit that referenced this pull request Dec 16, 2025
## [9.27.2](v9.27.1...v9.27.2) (2025-12-16)

### Bug Fixes

* remove blocked messages from offline db ([#1666](#1666)) ([81883a4](81883a4))
* send edited message with error type as regular one ([#1664](#1664)) ([547cd2f](547cd2f))
@stream-ci-bot
Copy link

🎉 This PR is included in version 9.27.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments