Function
isThreadCreator
(
currentUser: SerializedUser | null,
thread: SerializedThread
)
Source from the content-addressed store, hash-verified
| 159 | } |
| 160 | |
| 161 | function isThreadCreator( |
| 162 | currentUser: SerializedUser | null, |
| 163 | thread: SerializedThread |
| 164 | ): boolean { |
| 165 | const creator = thread.messages[0].author; |
| 166 | if (!currentUser || !creator) { |
| 167 | return false; |
| 168 | } |
| 169 | return currentUser.id === creator.id; |
| 170 | } |
| 171 | |
| 172 | async function uploadFiles(files: File[]) { |
| 173 | setProgress(0); |
Tested by
no test coverage detected