jsonrpc: add viewType to quoted message(MessageQuote type) in Message object type (#3651)

* jsonrpc: add `viewType` to quoted message(`MessageQuote` type) in `Message` object type

* add pr number to changelog
This commit is contained in:
Simon Laux
2022-10-13 17:41:54 +02:00
committed by GitHub
parent 81d0ecd8f6
commit 86e1476dee
3 changed files with 4 additions and 1 deletions

View File

@@ -37,6 +37,7 @@
- jsonrpc: add type: #3641, #3645
- `MessageSearchResult`
- `Location`
- jsonrpc: add `viewType` to quoted message(`MessageQuote` type) in `Message` object type #3651
### Changes

View File

@@ -81,6 +81,7 @@ enum MessageQuote {
override_sender_name: Option<String>,
image: Option<String>,
is_forwarded: bool,
view_type: MessageViewtype,
},
}
@@ -129,6 +130,7 @@ impl MessageObject {
None
},
is_forwarded: quote.is_forwarded(),
view_type: quote.get_viewtype().into(),
})
}
None => Some(MessageQuote::JustText { text: quoted_text }),

View File

@@ -62,7 +62,6 @@ export type MessageListItem=(({"kind":"message";}&{"msg_id":U32;})|({
* Marker timestamp, for day markers, in unix milliseconds
*/
"timestamp":I64;}));
export type MessageQuote=(({"kind":"JustText";}&{"text":string;})|({"kind":"WithMessage";}&{"text":string;"messageId":U32;"authorDisplayName":string;"authorDisplayColor":string;"overrideSenderName":(string|null);"image":(string|null);"isForwarded":boolean;}));
export type Viewtype=("Unknown"|
/**
* Text message.
@@ -108,6 +107,7 @@ export type Viewtype=("Unknown"|
* Message is an webxdc instance.
*/
"Webxdc");
export type MessageQuote=(({"kind":"JustText";}&{"text":string;})|({"kind":"WithMessage";}&{"text":string;"messageId":U32;"authorDisplayName":string;"authorDisplayColor":string;"overrideSenderName":(string|null);"image":(string|null);"isForwarded":boolean;"viewType":Viewtype;}));
export type I32=number;
export type WebxdcMessageInfo={
/**