MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / isChannelRead

Function isChannelRead

packages/serializers/src/read-status.ts:3–11  ·  view source on GitHub ↗
(
  lastReadAt: BigInt,
  lastReplyAt: BigInt | null
)

Source from the content-addressed store, hash-verified

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

Callers 1

serializeReadStatusFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected