( ctx context.Context, chatID uuid.UUID, )
| 4230 | } |
| 4231 | |
| 4232 | func (api *API) getCachedChatDiffStatus( |
| 4233 | ctx context.Context, |
| 4234 | chatID uuid.UUID, |
| 4235 | ) (database.ChatDiffStatus, bool, error) { |
| 4236 | status, err := api.Database.GetChatDiffStatusByChatID(ctx, chatID) |
| 4237 | if err == nil { |
| 4238 | return status, true, nil |
| 4239 | } |
| 4240 | if xerrors.Is(err, sql.ErrNoRows) { |
| 4241 | return database.ChatDiffStatus{}, false, nil |
| 4242 | } |
| 4243 | return database.ChatDiffStatus{}, false, xerrors.Errorf( |
| 4244 | "get chat diff status: %w", |
| 4245 | err, |
| 4246 | ) |
| 4247 | } |
| 4248 | |
| 4249 | // resolveExternalAuth finds the external auth config matching the |
| 4250 | // given remote origin URL and returns both the provider type string |
no test coverage detected