mirror of
https://github.com/chatmail/core.git
synced 2026-05-19 06:46:32 +03:00
jsonrpc: add message errors to MessageObject
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
### API-Changes
|
### API-Changes
|
||||||
- Add Python API to send reactions #3762
|
- Add Python API to send reactions #3762
|
||||||
|
- jsonrpc: add message errors to MessageObject #3788
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
- Make sure malformed messsages will never block receiving further messages anymore #3771
|
- Make sure malformed messsages will never block receiving further messages anymore #3771
|
||||||
|
|||||||
@@ -34,6 +34,9 @@ pub struct MessageObject {
|
|||||||
view_type: MessageViewtype,
|
view_type: MessageViewtype,
|
||||||
state: u32,
|
state: u32,
|
||||||
|
|
||||||
|
/// An error text, if there is one.
|
||||||
|
error: Option<String>,
|
||||||
|
|
||||||
timestamp: i64,
|
timestamp: i64,
|
||||||
sort_timestamp: i64,
|
sort_timestamp: i64,
|
||||||
received_timestamp: i64,
|
received_timestamp: i64,
|
||||||
@@ -167,6 +170,7 @@ impl MessageObject {
|
|||||||
.get_state()
|
.get_state()
|
||||||
.to_u32()
|
.to_u32()
|
||||||
.ok_or_else(|| anyhow!("state conversion to number failed"))?,
|
.ok_or_else(|| anyhow!("state conversion to number failed"))?,
|
||||||
|
error: message.error(),
|
||||||
|
|
||||||
timestamp: message.get_timestamp(),
|
timestamp: message.get_timestamp(),
|
||||||
sort_timestamp: message.get_sort_timestamp(),
|
sort_timestamp: message.get_sort_timestamp(),
|
||||||
|
|||||||
Reference in New Issue
Block a user