fix: send edited message with error type as regular one#1664
fix: send edited message with error type as regular one#1664
Conversation
|
Size Change: +80 B (+0.02%) Total Size: 356 kB
|
There was a problem hiding this comment.
| 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, |
There was a problem hiding this comment.
Aren't they the same just not in one line? 😅
There was a problem hiding this comment.
I would have preferred shorter conditionals but okay if you want me to do it, I can push your suggestion.
There was a problem hiding this comment.
I will let you decide
There was a problem hiding this comment.
In that case, I will keep the shorter one. :)
There was a problem hiding this comment.
The shorter one is my suggestion if you count lines, so not sure, which you take :)
There was a problem hiding this comment.
I have even shortened more now
There was a problem hiding this comment.
Pushed your suggestion
There was a problem hiding this comment.
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.
|
🎉 This PR is included in version 9.27.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
CLA
Description of the changes, What, Why and How?
Changelog