MCPcopy
hub / github.com/tinode/chat / ErrAttachFirst

Function ErrAttachFirst

server/datamodel.go:1504–1516  ·  view source on GitHub ↗

ErrAttachFirst must attach to topic first in response to a client message (409).

(msg *ClientComMessage, ts time.Time)

Source from the content-addressed store, hash-verified

1502
1503// ErrAttachFirst must attach to topic first in response to a client message (409).
1504func ErrAttachFirst(msg *ClientComMessage, ts time.Time) *ServerComMessage {
1505 return &ServerComMessage{
1506 Ctrl: &MsgServerCtrl{
1507 Id: msg.Id,
1508 Code: http.StatusConflict, // 409
1509 Text: "must attach first",
1510 Topic: msg.Original,
1511 Timestamp: ts,
1512 },
1513 Id: msg.Id,
1514 Timestamp: msg.Timestamp,
1515 }
1516}
1517
1518// ErrAlreadyExists the object already exists (409).
1519func ErrAlreadyExists(id, topic string, ts time.Time) *ServerComMessage {

Callers 4

leaveMethod · 0.85
publishMethod · 0.85
delMethod · 0.85
noteMethod · 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…