add fields for server delivery tracking
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|||||||
@@ -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"`
|
||||||
|
|||||||
@@ -1503,20 +1503,22 @@ func (x *Location) GetAltitude() int32 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type DbMessage struct {
|
type DbMessage struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
Outbound bool `protobuf:"varint,1,opt,name=outbound,proto3" json:"outbound,omitempty"` // direction of the message
|
Outbound bool `protobuf:"varint,1,opt,name=outbound,proto3" json:"outbound,omitempty"` // direction of the message
|
||||||
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
|
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
|
||||||
Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // text data
|
Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // text data
|
||||||
Status *ConversationStatus `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"`
|
Status *ConversationStatus `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"`
|
||||||
Contact *ContactCard `protobuf:"bytes,5,opt,name=contact,proto3" json:"contact,omitempty"`
|
Contact *ContactCard `protobuf:"bytes,5,opt,name=contact,proto3" json:"contact,omitempty"`
|
||||||
Group *Group `protobuf:"bytes,6,opt,name=group,proto3" json:"group,omitempty"`
|
Group *Group `protobuf:"bytes,6,opt,name=group,proto3" json:"group,omitempty"`
|
||||||
FilePaths []string `protobuf:"bytes,7,rep,name=file_paths,json=filePaths,proto3" json:"file_paths,omitempty"`
|
FilePaths []string `protobuf:"bytes,7,rep,name=file_paths,json=filePaths,proto3" json:"file_paths,omitempty"`
|
||||||
CurrentLocation *Location `protobuf:"bytes,8,opt,name=current_location,json=currentLocation,proto3" json:"current_location,omitempty"`
|
CurrentLocation *Location `protobuf:"bytes,8,opt,name=current_location,json=currentLocation,proto3" json:"current_location,omitempty"`
|
||||||
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
|
||||||
unknownFields protoimpl.UnknownFields
|
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
|
||||||
sizeCache protoimpl.SizeCache
|
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
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DbMessage) Reset() {
|
func (x *DbMessage) Reset() {
|
||||||
@@ -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" +
|
||||||
|
|||||||
@@ -207,16 +207,18 @@ message Location {
|
|||||||
|
|
||||||
message DbMessage {
|
message DbMessage {
|
||||||
bool outbound = 1; // direction of the message
|
bool outbound = 1; // direction of the message
|
||||||
string type = 2;
|
string type = 2;
|
||||||
bytes data = 3; // text data
|
bytes data = 3; // text data
|
||||||
ConversationStatus status = 4;
|
ConversationStatus status = 4;
|
||||||
ContactCard contact = 5;
|
ContactCard contact = 5;
|
||||||
Group group = 6;
|
Group group = 6;
|
||||||
repeated string file_paths = 7;
|
repeated string file_paths = 7;
|
||||||
Location current_location = 8;
|
Location current_location = 8;
|
||||||
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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user