( lastReadAt: BigInt, lastReplyAt: BigInt | null )
| 1 | import { SerializedReadStatus } from '@linen/types'; |
| 2 | |
| 3 | function isChannelRead( |
| 4 | lastReadAt: BigInt, |
| 5 | lastReplyAt: BigInt | null |
| 6 | ): boolean { |
| 7 | if (!lastReplyAt) { |
| 8 | return true; |
| 9 | } |
| 10 | return lastReadAt >= lastReplyAt; |
| 11 | } |
| 12 | |
| 13 | export function serializeReadStatus(status: any): SerializedReadStatus { |
| 14 | const thread = status?.channel?.threads[0]; |
no outgoing calls
no test coverage detected