MCPcopy Create free account
hub / github.com/LagrangeDev/LagrangeGo / BuildElement

Method BuildElement

message/build.go:90–109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

88}
89
90func (e *ReplyElement) BuildElement() []*message.Elem {
91 forwardReserve := message.Preserve{
92 MessageId: uint64(e.ReplySeq),
93 ReceiverUid: e.SenderUID,
94 }
95 forwardReserveData, err := proto.Marshal(&forwardReserve)
96 if err != nil {
97 return nil
98 }
99 return []*message.Elem{{
100 SrcMsg: &message.SrcMsg{
101 OrigSeqs: []uint32{e.ReplySeq},
102 SenderUin: uint64(e.SenderUin),
103 Time: proto.Some(int32(e.Time)),
104 Elems: PackElements(e.Elements),
105 PbReserve: forwardReserveData,
106 ToUin: proto.Some(uint64(0)),
107 },
108 }}
109}
110
111func (e *VoiceElement) BuildElement() []*message.Elem {
112 common, err := proto.Marshal(e.MsgInfo)

Callers

nothing calls this directly

Calls 3

MarshalFunction · 0.92
SomeFunction · 0.92
PackElementsFunction · 0.85

Tested by

no test coverage detected