mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 09:26:29 +03:00
get contact- and chat-info for device-messages
This commit is contained in:
committed by
holger krekel
parent
89bb2d0ffe
commit
f8afefa2c1
@@ -97,6 +97,8 @@ impl Chat {
|
|||||||
|
|
||||||
if chat.param.exists(Param::Selftalk) {
|
if chat.param.exists(Param::Selftalk) {
|
||||||
chat.name = context.stock_str(StockMessage::SelfMsg).into();
|
chat.name = context.stock_str(StockMessage::SelfMsg).into();
|
||||||
|
} else if chat.param.exists(Param::Devicetalk) {
|
||||||
|
chat.name = context.stock_str(StockMessage::DeviceMessages).into();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -153,7 +153,16 @@ impl Contact {
|
|||||||
blocked: false,
|
blocked: false,
|
||||||
origin: Origin::Unknown,
|
origin: Origin::Unknown,
|
||||||
};
|
};
|
||||||
|
return Ok(contact);
|
||||||
|
} else if contact_id == DC_CONTACT_ID_DEVICE {
|
||||||
|
let contact = Contact {
|
||||||
|
id: contact_id,
|
||||||
|
name: context.stock_str(StockMessage::DeviceMessages).into(),
|
||||||
|
authname: "".into(),
|
||||||
|
addr: "device@localhost".into(),
|
||||||
|
blocked: false,
|
||||||
|
origin: Origin::Unknown,
|
||||||
|
};
|
||||||
return Ok(contact);
|
return Ok(contact);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -110,6 +110,8 @@ pub enum StockMessage {
|
|||||||
Location = 66,
|
Location = 66,
|
||||||
#[strum(props(fallback = "Sticker"))]
|
#[strum(props(fallback = "Sticker"))]
|
||||||
Sticker = 67,
|
Sticker = 67,
|
||||||
|
#[strum(props(fallback = "Device Messages"))]
|
||||||
|
DeviceMessages = 68,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl StockMessage {
|
impl StockMessage {
|
||||||
|
|||||||
Reference in New Issue
Block a user