MCPcopy Index your code
hub / github.com/coder/coder / PinChatByID

Method PinChatByID

coderd/database/dbauthz/dbauthz.go:6326–6335  ·  view source on GitHub ↗
(ctx context.Context, id uuid.UUID)

Source from the content-addressed store, hash-verified

6324}
6325
6326func (q *querier) PinChatByID(ctx context.Context, id uuid.UUID) error {
6327 chat, err := q.db.GetChatByID(ctx, id)
6328 if err != nil {
6329 return err
6330 }
6331 if err := q.authorizeContext(ctx, policy.ActionUpdate, chat); err != nil {
6332 return err
6333 }
6334 return q.db.PinChatByID(ctx, id)
6335}
6336
6337func (q *querier) PopNextQueuedMessage(ctx context.Context, chatID uuid.UUID) (database.ChatQueuedMessage, error) {
6338 chat, err := q.db.GetChatByID(ctx, chatID)

Callers

nothing calls this directly

Calls 3

authorizeContextMethod · 0.95
GetChatByIDMethod · 0.65
PinChatByIDMethod · 0.65

Tested by

no test coverage detected