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

Method GetLastChatMessageByRole

coderd/database/dbauthz/dbauthz.go:3568–3575  ·  view source on GitHub ↗
(ctx context.Context, arg database.GetLastChatMessageByRoleParams)

Source from the content-addressed store, hash-verified

3566}
3567
3568func (q *querier) GetLastChatMessageByRole(ctx context.Context, arg database.GetLastChatMessageByRoleParams) (database.ChatMessage, error) {
3569 // Authorize read on the parent chat.
3570 _, err := q.GetChatByID(ctx, arg.ChatID)
3571 if err != nil {
3572 return database.ChatMessage{}, err
3573 }
3574 return q.db.GetLastChatMessageByRole(ctx, arg)
3575}
3576
3577func (q *querier) GetLastUpdateCheck(ctx context.Context) (string, error) {
3578 if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceSystem); err != nil {

Callers

nothing calls this directly

Calls 2

GetChatByIDMethod · 0.95

Tested by

no test coverage detected