some adjustmentsfor server delivery and peer storage study
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
ycc
2024-05-23 14:14:12 +02:00
parent d657e64ae4
commit 17c991f442
7 changed files with 346 additions and 139 deletions

View File

@ -46,6 +46,8 @@ type Peer struct {
Blocked bool `json:"blocked,omitempty"`
MessageNotification string `json:"message_notification,omitempty"`
MatriochkaMode bool `json:"matriochka_mode,omitempty"`
ServerDeliveryInfo bool `json:"server_delivery_info,omitempty"`
CallsAllowed bool `json:"calls_allowed,omitempty"`
DirectMode bool `json:"direct_mode,omitempty"`
DbIds []string `json:"db_ids,omitempty"`
Type string `json:"type,omitempty"`
@ -229,6 +231,9 @@ func (p *Peer) PackUserMessage(message []byte, signature []byte) *meowlib.Packed
msg.Destination = p.ContactLookupKey
msg.Payload = message
msg.Signature = signature
if p.ServerDeliveryInfo {
msg.ServerDeliveryUuid = uuid.New().String()
}
return &msg
}