mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 17:36:29 +03:00
feat: Set dimensions for outgoing Sticker messages
For incoming `Sticker` messages, dimensions are already set, so make the code consistent.
This commit is contained in:
@@ -651,8 +651,10 @@ impl Message {
|
|||||||
if self.viewtype.has_file() {
|
if self.viewtype.has_file() {
|
||||||
let file_param = self.param.get_file_path(context)?;
|
let file_param = self.param.get_file_path(context)?;
|
||||||
if let Some(path_and_filename) = file_param {
|
if let Some(path_and_filename) = file_param {
|
||||||
if (self.viewtype == Viewtype::Image || self.viewtype == Viewtype::Gif)
|
if matches!(
|
||||||
&& !self.param.exists(Param::Width)
|
self.viewtype,
|
||||||
|
Viewtype::Image | Viewtype::Gif | Viewtype::Sticker
|
||||||
|
) && !self.param.exists(Param::Width)
|
||||||
{
|
{
|
||||||
let buf = read_file(context, &path_and_filename).await?;
|
let buf = read_file(context, &path_and_filename).await?;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user