Skip to content

Messages service

TIP

Available as a contextual service

Overview

Manages messages within a context. Supports fuzzy and diacritic-insensitive full-text search across title, body, and author fields. Timestamps are automatically set on creation and kept in sync on update.

Data model

FieldTypeDescription
titleStringMessage title
bodyStringMessage body text
authorStringAuthor identifier
createdAtDateCreation timestamp (set automatically)
updatedAtDateLast update timestamp (set automatically)

MongoDB indexes:

  • createdAt — for time-based sorting
  • title, body, author — collation-aware text indexes (English and French)

Hooks

The following hooks are executed on the messages service: