MCPcopy
hub / github.com/gotify/server / toExternalMessage

Function toExternalMessage

api/message.go:409–423  ·  view source on GitHub ↗
(msg *model.Message)

Source from the content-addressed store, hash-verified

407}
408
409func toExternalMessage(msg *model.Message) *model.MessageExternal {
410 res := &model.MessageExternal{
411 ID: msg.ID,
412 ApplicationID: msg.ApplicationID,
413 Message: msg.Message,
414 Title: msg.Title,
415 Priority: &msg.Priority,
416 Date: msg.Date,
417 }
418 if len(msg.Extras) != 0 {
419 res.Extras = make(map[string]interface{})
420 json.Unmarshal(msg.Extras, &res.Extras)
421 }
422 return res
423}
424
425func toExternalMessages(msg []*model.Message) []*model.MessageExternal {
426 res := make([]*model.MessageExternal, len(msg))

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…