(threadId: string)
| 384 | } |
| 385 | |
| 386 | async function starThread(threadId: string) { |
| 387 | return api |
| 388 | .starThread({ threadId, communityId: currentCommunity.id }) |
| 389 | .then(() => { |
| 390 | Toast.success('Starred successfully.'); |
| 391 | }) |
| 392 | .catch((exception) => { |
| 393 | if (exception.status === 409) { |
| 394 | Toast.info('Thread is already starred.'); |
| 395 | } else { |
| 396 | Toast.error( |
| 397 | exception?.message || 'Something went wrong. Please try again.' |
| 398 | ); |
| 399 | } |
| 400 | }); |
| 401 | } |
| 402 | |
| 403 | async function updateThreadResolution(threadId: string, messageId?: string) { |
| 404 | setThreads((threads) => { |
nothing calls this directly
no test coverage detected