feat(db): use custom event name instead of 'CUSTOM' in CH

This commit is contained in:
Alexander 2025-05-12 16:41:42 +02:00
parent 3edea4acb4
commit 27e20c4ef1

View file

@ -725,7 +725,6 @@ func (c *connectorImpl) InsertRequest(session *sessions.Session, msg *messages.N
func (c *connectorImpl) InsertCustom(session *sessions.Session, msg *messages.CustomEvent) error { func (c *connectorImpl) InsertCustom(session *sessions.Session, msg *messages.CustomEvent) error {
jsonString, err := json.Marshal(map[string]interface{}{ jsonString, err := json.Marshal(map[string]interface{}{
"name": msg.Name,
"payload": msg.Payload, "payload": msg.Payload,
"user_device": session.UserDevice, "user_device": session.UserDevice,
"user_device_type": session.UserDeviceType, "user_device_type": session.UserDeviceType,
@ -739,11 +738,11 @@ func (c *connectorImpl) InsertCustom(session *sessions.Session, msg *messages.Cu
session.SessionID, session.SessionID,
uint16(session.ProjectID), uint16(session.ProjectID),
getUUID(msg), getUUID(msg),
"CUSTOM", msg.Name,
eventTime, eventTime,
eventTime.Unix(), eventTime.Unix(),
session.UserUUID, session.UserUUID,
true, false,
session.Platform, session.Platform,
session.UserOSVersion, session.UserOSVersion,
session.UserOS, session.UserOS,