MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / nonSystemMessageCondition

Function nonSystemMessageCondition

packages/core/src/query/contact-queries.ts:500–503  ·  view source on GitHub ↗
(db: DatabaseAdapter, messageAlias: string, memberAlias: string)

Source from the content-addressed store, hash-verified

498}
499
500function nonSystemMessageCondition(db: DatabaseAdapter, messageAlias: string, memberAlias: string): string {
501 return `(${messageAlias}.type NOT IN (${SYSTEM_MESSAGE_TYPES_SQL})
502 AND ${nonSystemMemberIdentityCondition(db, memberAlias)})`
503}
504
505function nonSystemMemberIdentityCondition(db: DatabaseAdapter, memberAlias: string): string {
506 return `(LOWER(COALESCE(${memberAlias}.platform_id, '')) != 'system'

Callers 4

getPrivateContactFactsFunction · 0.85
getGroupContactFactsFunction · 0.85

Calls 1

Tested by

no test coverage detected