feat: add images count to reply (#3574)

* feat: add images count to reply
This commit is contained in:
Omar Basem 2023-06-06 15:52:07 +04:00 committed by GitHub
parent bf29188b2d
commit 1d4fa29f8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 11 deletions

View File

@ -1 +1 @@
0.154.9 0.155.1

View File

@ -34,6 +34,7 @@ type QuotedMessage struct {
From string `json:"from"` From string `json:"from"`
Text string `json:"text"` Text string `json:"text"`
ParsedText json.RawMessage `json:"parsedText,omitempty"` ParsedText json.RawMessage `json:"parsedText,omitempty"`
AlbumImagesCount int64 `json:"albumImagesCount"`
// ImageLocalURL is the local url of the image // ImageLocalURL is the local url of the image
ImageLocalURL string `json:"image,omitempty"` ImageLocalURL string `json:"image,omitempty"`
// AudioLocalURL is the local url of the audio // AudioLocalURL is the local url of the audio

View File

@ -176,6 +176,7 @@ func (db sqlitePersistence) tableUserMessagesAllFieldsJoin() string {
m2.source, m2.source,
m2.text, m2.text,
m2.parsed_text, m2.parsed_text,
m2.album_images_count,
m2.audio_duration_ms, m2.audio_duration_ms,
m2.community_id, m2.community_id,
m2.id, m2.id,
@ -203,6 +204,7 @@ func (db sqlitePersistence) tableUserMessagesScanAllFields(row scanner, message
var ContentType sql.NullInt64 var ContentType sql.NullInt64
var quotedText sql.NullString var quotedText sql.NullString
var quotedParsedText []byte var quotedParsedText []byte
var quotedAlbumImagesCount sql.NullInt64
var quotedFrom sql.NullString var quotedFrom sql.NullString
var quotedAudioDuration sql.NullInt64 var quotedAudioDuration sql.NullInt64
var quotedCommunityID sql.NullString var quotedCommunityID sql.NullString
@ -309,6 +311,7 @@ func (db sqlitePersistence) tableUserMessagesScanAllFields(row scanner, message
&quotedFrom, &quotedFrom,
&quotedText, &quotedText,
&quotedParsedText, &quotedParsedText,
&quotedAlbumImagesCount,
&quotedAudioDuration, &quotedAudioDuration,
&quotedCommunityID, &quotedCommunityID,
&quotedID, &quotedID,
@ -365,6 +368,7 @@ func (db sqlitePersistence) tableUserMessagesScanAllFields(row scanner, message
From: quotedFrom.String, From: quotedFrom.String,
Text: quotedText.String, Text: quotedText.String,
ParsedText: quotedParsedText, ParsedText: quotedParsedText,
AlbumImagesCount: quotedAlbumImagesCount.Int64,
CommunityID: quotedCommunityID.String, CommunityID: quotedCommunityID.String,
Deleted: quotedDeleted.Bool, Deleted: quotedDeleted.Bool,
} }