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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
_, err = statement.Exec(encData)
|
result, err := statement.Exec(encData)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
id, err := result.LastInsertId()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
ium := DbMessageToInternalUserMessage(id, dbid, dbm)
|
||||||
|
peer.LastMessage = ium
|
||||||
|
GetConfig().me.Save()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,17 +27,15 @@ type Peer struct {
|
|||||||
MyPullServers []string `json:"my_pull_servers,omitempty"`
|
MyPullServers []string `json:"my_pull_servers,omitempty"`
|
||||||
// Peer keys and infos
|
// Peer keys and infos
|
||||||
//Contact meowlib.ContactCard `json:"contact,omitempty"` // todo : remove
|
//Contact meowlib.ContactCard `json:"contact,omitempty"` // todo : remove
|
||||||
ContactPublicKey string `json:"contact_public_key,omitempty"`
|
ContactPublicKey string `json:"contact_public_key,omitempty"`
|
||||||
ContactLookupKey string `json:"contact_lookup_key,omitempty"`
|
ContactLookupKey string `json:"contact_lookup_key,omitempty"`
|
||||||
ContactEncryption string `json:"contact_encryption,omitempty"`
|
ContactEncryption string `json:"contact_encryption,omitempty"`
|
||||||
ContactPullServers []string `json:"contact_pull_servers,omitempty"`
|
ContactPullServers []string `json:"contact_pull_servers,omitempty"`
|
||||||
InvitationId string `json:"invitation_id,omitempty"`
|
InvitationId string `json:"invitation_id,omitempty"`
|
||||||
InvitationUrl string `json:"invitation_url,omitempty"`
|
InvitationUrl string `json:"invitation_url,omitempty"`
|
||||||
InvitationMessage string `json:"invitation_message,omitempty"`
|
InvitationMessage string `json:"invitation_message,omitempty"`
|
||||||
InvitationExpiry time.Time `json:"invitation_expiry,omitempty"`
|
InvitationExpiry time.Time `json:"invitation_expiry,omitempty"`
|
||||||
LastMessage string `json:"last_message,omitempty"`
|
LastMessage *InternalUserMessage `json:"last_message,omitempty"`
|
||||||
LastMessageDate int64 `json:"last_message_date,omitempty"`
|
|
||||||
LastMessageStatus string `json:"last_message_status,omitempty"`
|
|
||||||
// Internal management attributes
|
// Internal management attributes
|
||||||
Visible bool `json:"visible,omitempty"`
|
Visible bool `json:"visible,omitempty"`
|
||||||
VisiblePassword string `json:"visible_password,omitempty"`
|
VisiblePassword string `json:"visible_password,omitempty"`
|
||||||
|
Loading…
Reference in New Issue
Block a user