add fields for server delivery tracking
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
ycc
2026-02-27 21:45:44 +01:00
parent e6f9bc796e
commit a322f3fccf
5 changed files with 45 additions and 19 deletions

View File

@@ -20,6 +20,8 @@ func DbMessageToInternalUserMessage(id int64, dbFile string, dbm *meowlib.DbMess
ium.Messagetype = dbm.Type ium.Messagetype = dbm.Type
ium.Appdata = dbm.Appdata ium.Appdata = dbm.Appdata
ium.FilePaths = dbm.FilePaths ium.FilePaths = dbm.FilePaths
ium.ServerDeliveryUuid = dbm.ServerDeliveryUuid
ium.ServerDeliveryTimestamp = dbm.ServerDeliveryTimestamp
return &ium return &ium
} }
@@ -33,6 +35,8 @@ func InternalUserMessageToDbMessage(ium *InternalUserMessage) *meowlib.DbMessage
dbm.CurrentLocation = ium.CurrentLocation dbm.CurrentLocation = ium.CurrentLocation
dbm.Status = ium.Status dbm.Status = ium.Status
dbm.FilePaths = ium.FilePaths dbm.FilePaths = ium.FilePaths
dbm.ServerDeliveryUuid = ium.ServerDeliveryUuid
dbm.ServerDeliveryTimestamp = ium.ServerDeliveryTimestamp
return &dbm return &dbm
} }

View File

@@ -1,5 +1,6 @@
package helpers package helpers
/*
import ( import (
"forge.redroom.link/yves/meowlib" "forge.redroom.link/yves/meowlib"
"forge.redroom.link/yves/meowlib/client" "forge.redroom.link/yves/meowlib/client"
@@ -28,3 +29,4 @@ func HttpSendMessage(serverUid string, message []byte, timeout int) ([]byte, err
} }
return response, nil return response, nil
} }
*/

View File

@@ -9,7 +9,7 @@ type InternalUserMessage struct {
Status *meowlib.ConversationStatus `json:"conversation_status,omitempty"` Status *meowlib.ConversationStatus `json:"conversation_status,omitempty"`
Contact *meowlib.ContactCard `json:"contact,omitempty"` Contact *meowlib.ContactCard `json:"contact,omitempty"`
ServerDeliveryUuid string `json:"server_delivery_uuid,omitempty"` ServerDeliveryUuid string `json:"server_delivery_uuid,omitempty"`
ServerDeliveryTimestamp int64 `json:"server_delivery_timestamp,omitempty"` ServerDeliveryTimestamp uint64 `json:"server_delivery_timestamp,omitempty"`
//Group group //Group group
FilePaths []string `json:"file_paths,omitempty"` FilePaths []string `json:"file_paths,omitempty"`
CurrentLocation *meowlib.Location `json:"current_location,omitempty"` CurrentLocation *meowlib.Location `json:"current_location,omitempty"`

View File

@@ -1515,6 +1515,8 @@ type DbMessage struct {
Appdata []byte `protobuf:"bytes,9,opt,name=appdata,proto3" json:"appdata,omitempty"` Appdata []byte `protobuf:"bytes,9,opt,name=appdata,proto3" json:"appdata,omitempty"`
Invitation *Invitation `protobuf:"bytes,10,opt,name=invitation,proto3" json:"invitation,omitempty"` Invitation *Invitation `protobuf:"bytes,10,opt,name=invitation,proto3" json:"invitation,omitempty"`
From string `protobuf:"bytes,11,opt,name=from,proto3" json:"from,omitempty"` // source peer uid, used when storing group conversations with more than one peer From string `protobuf:"bytes,11,opt,name=from,proto3" json:"from,omitempty"` // source peer uid, used when storing group conversations with more than one peer
ServerDeliveryUuid string `protobuf:"bytes,12,opt,name=server_delivery_uuid,json=serverDeliveryUuid,proto3" json:"server_delivery_uuid,omitempty"` // uuid returned by the server upon delivery
ServerDeliveryTimestamp uint64 `protobuf:"varint,13,opt,name=server_delivery_timestamp,json=serverDeliveryTimestamp,proto3" json:"server_delivery_timestamp,omitempty"` // timestamp of the server delivery
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
@@ -1626,6 +1628,20 @@ func (x *DbMessage) GetFrom() string {
return "" return ""
} }
func (x *DbMessage) GetServerDeliveryUuid() string {
if x != nil {
return x.ServerDeliveryUuid
}
return ""
}
func (x *DbMessage) GetServerDeliveryTimestamp() uint64 {
if x != nil {
return x.ServerDeliveryTimestamp
}
return 0
}
type VideoData struct { type VideoData struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
@@ -1909,7 +1925,7 @@ const file_messages_proto_rawDesc = "" +
"\x04time\x18\x01 \x01(\x04R\x04time\x12\x1a\n" + "\x04time\x18\x01 \x01(\x04R\x04time\x12\x1a\n" +
"\blatitude\x18\x02 \x01(\x02R\blatitude\x12\x1c\n" + "\blatitude\x18\x02 \x01(\x02R\blatitude\x12\x1c\n" +
"\tlongitude\x18\x03 \x01(\x02R\tlongitude\x12\x1a\n" + "\tlongitude\x18\x03 \x01(\x02R\tlongitude\x12\x1a\n" +
"\baltitude\x18\x04 \x01(\x05R\baltitude\"\x9a\x03\n" + "\baltitude\x18\x04 \x01(\x05R\baltitude\"\x88\x04\n" +
"\tDbMessage\x12\x1a\n" + "\tDbMessage\x12\x1a\n" +
"\boutbound\x18\x01 \x01(\bR\boutbound\x12\x12\n" + "\boutbound\x18\x01 \x01(\bR\boutbound\x12\x12\n" +
"\x04type\x18\x02 \x01(\tR\x04type\x12\x12\n" + "\x04type\x18\x02 \x01(\tR\x04type\x12\x12\n" +
@@ -1925,7 +1941,9 @@ const file_messages_proto_rawDesc = "" +
"invitation\x18\n" + "invitation\x18\n" +
" \x01(\v2\x13.meowlib.InvitationR\n" + " \x01(\v2\x13.meowlib.InvitationR\n" +
"invitation\x12\x12\n" + "invitation\x12\x12\n" +
"\x04from\x18\v \x01(\tR\x04from\"\xaa\x01\n" + "\x04from\x18\v \x01(\tR\x04from\x120\n" +
"\x14server_delivery_uuid\x18\f \x01(\tR\x12serverDeliveryUuid\x12:\n" +
"\x19server_delivery_timestamp\x18\r \x01(\x04R\x17serverDeliveryTimestamp\"\xaa\x01\n" +
"\tVideoData\x12\x10\n" + "\tVideoData\x12\x10\n" +
"\x03url\x18\x01 \x01(\tR\x03url\x12\x12\n" + "\x03url\x18\x01 \x01(\tR\x03url\x12\x12\n" +
"\x04room\x18\x02 \x01(\tR\x04room\x12\x1a\n" + "\x04room\x18\x02 \x01(\tR\x04room\x12\x1a\n" +

View File

@@ -217,6 +217,8 @@ message DbMessage {
bytes appdata = 9; bytes appdata = 9;
Invitation invitation = 10; Invitation invitation = 10;
string from = 11; // source peer uid, used when storing group conversations with more than one peer string from = 11; // source peer uid, used when storing group conversations with more than one peer
string server_delivery_uuid = 12; // uuid returned by the server upon delivery
uint64 server_delivery_timestamp = 13; // timestamp of the server delivery
} }
message VideoData { message VideoData {