feat: densify sms records and improve uplink matching
This commit is contained in:
@@ -124,14 +124,15 @@ func (c *connection) handleDeliver(pkt deliverPacket) error {
|
||||
ChannelID: c.channelID,
|
||||
CreatedAt: time.Now().UTC(),
|
||||
},
|
||||
SequenceID: pkt.seqID,
|
||||
PhoneNumber: strings.TrimSpace(pkt.srcTerminalID),
|
||||
DestID: strings.TrimSpace(pkt.destID),
|
||||
Content: content,
|
||||
ReceivedAt: time.Now().UTC(),
|
||||
SequenceID: pkt.seqID,
|
||||
GatewayMessageID: fmt.Sprint(pkt.msgID),
|
||||
PhoneNumber: strings.TrimSpace(pkt.srcTerminalID),
|
||||
DestID: strings.TrimSpace(pkt.destID),
|
||||
Content: content,
|
||||
ReceivedAt: time.Now().UTC(),
|
||||
}
|
||||
if c.protocolLogPublisher != nil {
|
||||
c.emitProtocolLog(protocolLogEvent{Protocol: "cmpp", Direction: "channel_to_platform", EventType: "deliver_uplink", Status: "success", ChannelID: c.channelID, Account: c.config.Account, MessageID: cmd.MessageID, Phone: strings.TrimSpace(pkt.srcTerminalID), Detail: map[string]any{"sequenceId": pkt.seqID}})
|
||||
c.emitProtocolLog(protocolLogEvent{Protocol: "cmpp", Direction: "channel_to_platform", EventType: "deliver_uplink", Status: "success", ChannelID: c.channelID, Account: c.config.Account, MessageID: cmd.MessageID, GatewayMessageID: fmt.Sprint(pkt.msgID), Phone: strings.TrimSpace(pkt.srcTerminalID), Detail: map[string]any{"sequenceId": pkt.seqID}})
|
||||
}
|
||||
var publishErr error
|
||||
if c.eventPublisher != nil {
|
||||
|
||||
Reference in New Issue
Block a user