[mentions] ParsedText in quoted message
ParsedText is needed to properly display mention in quoted message.
This commit is contained in:
parent
32b0af8ecc
commit
57728224d4
|
@ -19,8 +19,9 @@ import (
|
||||||
// QuotedMessage contains the original text of the message replied to
|
// QuotedMessage contains the original text of the message replied to
|
||||||
type QuotedMessage struct {
|
type QuotedMessage struct {
|
||||||
// From is a public key of the author of the message.
|
// From is a public key of the author of the message.
|
||||||
From string `json:"from"`
|
From string `json:"from"`
|
||||||
Text string `json:"text"`
|
Text string `json:"text"`
|
||||||
|
ParsedText json.RawMessage `json:"parsedText,omitempty"`
|
||||||
// Base64Image is the converted base64 image
|
// Base64Image is the converted base64 image
|
||||||
Base64Image string `json:"image,omitempty"`
|
Base64Image string `json:"image,omitempty"`
|
||||||
// Base64Audio is the converted base64 audio
|
// Base64Audio is the converted base64 audio
|
||||||
|
|
|
@ -88,6 +88,7 @@ func (db sqlitePersistence) tableUserMessagesAllFieldsJoin() string {
|
||||||
m1.response_to,
|
m1.response_to,
|
||||||
m2.source,
|
m2.source,
|
||||||
m2.text,
|
m2.text,
|
||||||
|
m2.parsed_text,
|
||||||
m2.image_base64,
|
m2.image_base64,
|
||||||
m2.audio_duration_ms,
|
m2.audio_duration_ms,
|
||||||
m2.audio_base64,
|
m2.audio_base64,
|
||||||
|
@ -105,6 +106,7 @@ type scanner interface {
|
||||||
|
|
||||||
func (db sqlitePersistence) tableUserMessagesScanAllFields(row scanner, message *Message, others ...interface{}) error {
|
func (db sqlitePersistence) tableUserMessagesScanAllFields(row scanner, message *Message, others ...interface{}) error {
|
||||||
var quotedText sql.NullString
|
var quotedText sql.NullString
|
||||||
|
var quotedParsedText []byte
|
||||||
var quotedFrom sql.NullString
|
var quotedFrom sql.NullString
|
||||||
var quotedImage sql.NullString
|
var quotedImage sql.NullString
|
||||||
var quotedAudio sql.NullString
|
var quotedAudio sql.NullString
|
||||||
|
@ -150,6 +152,7 @@ func (db sqlitePersistence) tableUserMessagesScanAllFields(row scanner, message
|
||||||
&message.ResponseTo,
|
&message.ResponseTo,
|
||||||
"edFrom,
|
"edFrom,
|
||||||
"edText,
|
"edText,
|
||||||
|
"edParsedText,
|
||||||
"edImage,
|
"edImage,
|
||||||
"edAudioDuration,
|
"edAudioDuration,
|
||||||
"edAudio,
|
"edAudio,
|
||||||
|
@ -165,6 +168,7 @@ func (db sqlitePersistence) tableUserMessagesScanAllFields(row scanner, message
|
||||||
message.QuotedMessage = &QuotedMessage{
|
message.QuotedMessage = &QuotedMessage{
|
||||||
From: quotedFrom.String,
|
From: quotedFrom.String,
|
||||||
Text: quotedText.String,
|
Text: quotedText.String,
|
||||||
|
ParsedText: quotedParsedText,
|
||||||
Base64Image: quotedImage.String,
|
Base64Image: quotedImage.String,
|
||||||
AudioDurationMs: uint64(quotedAudioDuration.Int64),
|
AudioDurationMs: uint64(quotedAudioDuration.Int64),
|
||||||
Base64Audio: quotedAudio.String,
|
Base64Audio: quotedAudio.String,
|
||||||
|
|
Loading…
Reference in New Issue