Update story gradients

This commit is contained in:
Fedor Indutny 2024-04-09 23:38:27 +02:00 committed by GitHub
parent e533292d33
commit 4caa260a22
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 48 additions and 16 deletions

View file

@ -679,7 +679,13 @@ export default class MessageSender {
}
if (attachmentAttrs.gradient) {
textAttachment.gradient = attachmentAttrs.gradient;
const { colors, positions, ...rest } = attachmentAttrs.gradient;
textAttachment.gradient = {
...rest,
colors: colors?.slice(),
positions: positions?.slice(),
};
textAttachment.background = 'gradient';
} else {
textAttachment.color = attachmentAttrs.color;