(ctx context.Context, arg database.UpdateChatStatusParams)
| 6756 | } |
| 6757 | |
| 6758 | func (q *querier) UpdateChatStatus(ctx context.Context, arg database.UpdateChatStatusParams) (database.Chat, error) { |
| 6759 | // UpdateChatStatus is used by the chat processor to change chat status. |
| 6760 | // It should be called with system context. |
| 6761 | chat, err := q.db.GetChatByID(ctx, arg.ID) |
| 6762 | if err != nil { |
| 6763 | return database.Chat{}, err |
| 6764 | } |
| 6765 | if err := q.authorizeContext(ctx, policy.ActionUpdate, chat); err != nil { |
| 6766 | return database.Chat{}, err |
| 6767 | } |
| 6768 | return q.db.UpdateChatStatus(ctx, arg) |
| 6769 | } |
| 6770 | |
| 6771 | func (q *querier) UpdateChatStatusPreserveUpdatedAt(ctx context.Context, arg database.UpdateChatStatusPreserveUpdatedAtParams) (database.Chat, error) { |
| 6772 | chat, err := q.db.GetChatByID(ctx, arg.ID) |
nothing calls this directly
no test coverage detected