Skip to content

ActivityPub Message Browser

The built-in activity_pub_msg_list module provides a scrollable, paginated list of messages (Notes) received from the Fediverse. It supports multiple view modes, lazy-loading of additional pages as the user scrolls, and navigation to a message viewer or thread view.

The browser can be opened in one of the following modes by passing mode via extraArgs:

ModeextraArgs.modeDescription
FederatedfederatedAll Notes received in the shared inbox. (default)
LocallocalNotes sent by users on this system.
TimelinetimelineNotes from a specific actor. Requires extraArgs.actorId.
MentionsmentionsNotes that mention the current user.
ThreadthreadAll Notes in a single thread/context. Requires extraArgs.contextId.

Example — launching the browser in Mentions mode from a menu action:

{
action: @menu:activityPubMsgBrowser
extraArgs: {
mode: mentions
}
}
KeyRequiredDescription
art.mainYesArt spec for the main browser screen.
dateTimeFormatNomoment.js format string for message timestamps. am/pm are collapsed to a/p. Defaults to MM/DD hh:mma (12-char output).
attIndicatorNoSingle character shown in the attachment column. Defaults to *.
likeIndicatorNoSingle character shown as the like indicator in TL10+ views. Defaults to (CP437 0x03).
boostIndicatorNoSingle character shown as the boost indicator in TL10+ views. Defaults to (CP437 0x1E).
viewerMenuNoMenu name to push when opening a message. Defaults to activityPubMsgViewer.
threadMenuNoMenu name to push when opening a thread. Defaults to actPubThread.

Example:

activityPubMsgBrowser: {
desc: ActivityPub Message Browser
module: ./activitypub/activity_pub_msg_list
config: {
art: {
main: activitypub_msg_browser
}
dateTimeFormat: "MM/DD hh:mma"
attIndicator: "@"
}
// ...
}

Each row in the list provides the following itemFormat / focusItemFormat fields:

FieldDescription
fromSender handle in @user@host form. Full length, truncate with {from:<16.16}.
subjectMessage subject/summary. Prefixed with [CW] for content-warned posts, re: for replies.
dateFormatted timestamp string (see dateTimeFormat).
likesLike count as a string; empty string when zero (blank-if-zero in right-justified formats).
boostsBoost count as a string; empty string when zero.
attAttachment indicator character, or a space when no attachment.
hasAttachmentBoolean true/false.
noteIdInternal ActivityPub Note ID (URL).
contextIdThread context/conversation ID, if present.
inReplyToID of the parent Note, if this is a reply.
textPre-built fallback display string (fixed 71-char layout). Used when itemFormat is not set in the theme.

Example itemFormat in theme.hjson:

activityPubMsgBrowser: {
0: {
mci: {
VM1: {
itemFormat: "|00|07{from:<16.16} {subject:<33.33} {date:<12.12} {likes:>2} {boosts:>2} {att}"
focusItemFormat: "|00|15{from:<16.16} {subject:<33.33} {date:<12.12} {likes:>2} {boosts:>2} {att}"
}
}
}
}

%TL10, %TL11, etc. may be placed in the art and configured in the menu’s config block using infoFormat## keys (e.g. infoFormat10). The following properties are available:

PropertyDescription
modeLabelCurrent mode name: Federated, Local, Timeline, Mentions, or Thread.
msgCountCurrent number of loaded messages (as a string).
attIndicatorConfigured attachment indicator character.
likeIndicatorConfigured like indicator character.
boostIndicatorConfigured boost indicator character.

Example:

activityPubMsgBrowser: {
config: {
infoFormat10: "{modeLabel} ({msgCount} messages)"
}
}

The following keys are handled by the listKeyPressed menu method, which should be assigned via actionKeys in form 0:

Key(s)Action
return, spaceOpen the selected message in the viewer.
bBoost (announce) the selected message.
lLike the selected message.
rReply to the selected message.
t, +Open the thread containing the selected message.
down arrowMove focus to the next message.
up arrowMove focus to the previous message.
page downScroll list down one page.
page upScroll list up one page.

Menu config example:

activityPubMsgBrowser: {
form: {
0: {
mci: {
VM1: {
focus: true
}
}
actionKeys: [
{
keys: ["return", "space", "b", "l", "r", "t", "+", "down arrow", "up arrow", "page up", "page down"]
action: @method:listKeyPressed
}
{
keys: ["escape", "q", "shift + q"]
action: @systemMethod:prevMenu
}
]
}
}
}

The browser fetches messages in pages of 25. When the focused row comes within 5 entries of the end of the loaded list, the next page is automatically fetched and appended — no user action is required.

Thread mode (mode: thread) loads all messages in the thread at once and does not paginate.