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

Function toInternalMessage

api/message.go:391–407  ·  view source on GitHub ↗
(msg *model.MessageExternal)

Source from the content-addressed store, hash-verified

389}
390
391func toInternalMessage(msg *model.MessageExternal) *model.Message {
392 res := &model.Message{
393 ID: msg.ID,
394 ApplicationID: msg.ApplicationID,
395 Message: msg.Message,
396 Title: msg.Title,
397 Date: msg.Date,
398 }
399 if msg.Priority != nil {
400 res.Priority = *msg.Priority
401 }
402
403 if msg.Extras != nil {
404 res.Extras, _ = json.Marshal(msg.Extras)
405 }
406 return res
407}
408
409func toExternalMessage(msg *model.Message) *model.MessageExternal {
410 res := &model.MessageExternal{

Callers 1

CreateMessageMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…