manifold/common/comment.ts
Boa 7b70b9b3bd
Free comments (#88)
* Allow free comments with optional bets

* Send emails for comments without bets

* Refactor to share logic

* No free comments on free response questions

* Minor fixes

* Condense line
2022-04-21 11:09:06 -06:00

17 lines
382 B
TypeScript

// Currently, comments are created after the bet, not atomically with the bet.
// They're uniquely identified by the pair contractId/betId.
export type Comment = {
id: string
contractId: string
betId?: string
userId: string
text: string
createdTime: number
// Denormalized, for rendering comments
userName: string
userUsername: string
userAvatarUrl?: string
}