[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
|
||||
type QuotedMessage struct {
|
||||
// From is a public key of the author of the message.
|
||||
From string `json:"from"`
|
||||
Text string `json:"text"`
|
||||
From string `json:"from"`
|
||||
Text string `json:"text"`
|
||||
ParsedText json.RawMessage `json:"parsedText,omitempty"`
|
||||
// Base64Image is the converted base64 image
|
||||
Base64Image string `json:"image,omitempty"`
|
||||
// Base64Audio is the converted base64 audio
|
||||
|
|
|
@ -88,6 +88,7 @@ func (db sqlitePersistence) tableUserMessagesAllFieldsJoin() string {
|
|||
m1.response_to,
|
||||
m2.source,
|
||||
m2.text,
|
||||
m2.parsed_text,
|
||||
m2.image_base64,
|
||||
m2.audio_duration_ms,
|
||||
m2.audio_base64,
|
||||
|
@ -105,6 +106,7 @@ type scanner interface {
|
|||
|
||||
func (db sqlitePersistence) tableUserMessagesScanAllFields(row scanner, message *Message, others ...interface{}) error {
|
||||
var quotedText sql.NullString
|
||||
var quotedParsedText []byte
|
||||
var quotedFrom sql.NullString
|
||||
var quotedImage sql.NullString
|
||||
var quotedAudio sql.NullString
|
||||
|
@ -150,6 +152,7 @@ func (db sqlitePersistence) tableUserMessagesScanAllFields(row scanner, message
|
|||
&message.ResponseTo,
|
||||
"edFrom,
|
||||
"edText,
|
||||
"edParsedText,
|
||||
"edImage,
|
||||
"edAudioDuration,
|
||||
"edAudio,
|
||||
|
@ -165,6 +168,7 @@ func (db sqlitePersistence) tableUserMessagesScanAllFields(row scanner, message
|
|||
message.QuotedMessage = &QuotedMessage{
|
||||
From: quotedFrom.String,
|
||||
Text: quotedText.String,
|
||||
ParsedText: quotedParsedText,
|
||||
Base64Image: quotedImage.String,
|
||||
AudioDurationMs: uint64(quotedAudioDuration.Int64),
|
||||
Base64Audio: quotedAudio.String,
|
||||
|
|
Loading…
Reference in New Issue