This commit is contained in:
parent
b47ef2480c
commit
f40f6520d2
@ -73,10 +73,17 @@ func StoreMessage(peer *Peer, usermessage *meowlib.UserMessage, filenames []stri
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = statement.Exec(encData)
|
||||
result, err := statement.Exec(encData)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
id, err := result.LastInsertId()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
ium := DbMessageToInternalUserMessage(id, dbid, dbm)
|
||||
peer.LastMessage = ium
|
||||
GetConfig().me.Save()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -35,9 +35,7 @@ type Peer struct {
|
||||
InvitationUrl string `json:"invitation_url,omitempty"`
|
||||
InvitationMessage string `json:"invitation_message,omitempty"`
|
||||
InvitationExpiry time.Time `json:"invitation_expiry,omitempty"`
|
||||
LastMessage string `json:"last_message,omitempty"`
|
||||
LastMessageDate int64 `json:"last_message_date,omitempty"`
|
||||
LastMessageStatus string `json:"last_message_status,omitempty"`
|
||||
LastMessage *InternalUserMessage `json:"last_message,omitempty"`
|
||||
// Internal management attributes
|
||||
Visible bool `json:"visible,omitempty"`
|
||||
VisiblePassword string `json:"visible_password,omitempty"`
|
||||
|
Loading…
Reference in New Issue
Block a user