add image to chat preview (#4888)

This commit is contained in:
flexsurfer 2024-04-09 17:39:14 +02:00 committed by GitHub
parent 1ceb180e8a
commit 69326767d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -243,6 +243,9 @@ type ChatPreview struct {
From string `json:"from"`
Deleted bool `json:"deleted"`
DeletedForMe bool `json:"deletedForMe"`
// Image of the chat in Base64 format
Base64Image string `json:"image,omitempty"`
}
func (c *Chat) PublicKey() (*ecdsa.PublicKey, error) {

View File

@ -76,6 +76,7 @@ func (m *Messenger) ChatsPreview() []*ChatPreview {
SyncedFrom: chat.SyncedFrom,
Highlight: chat.Highlight,
Members: chat.Members,
Base64Image: chat.Base64Image,
}
if chat.LastMessage != nil {