The player wall
phantom.aj.playerWallOther players
Jammer walls: posts, likes, privacy.
Scripts and plugins
A script has all of it, as phantom.aj.playerWall, and so does a plugin, from ctx.phantom(): the SDK runs in the plugin's own frame. Each call is marked with what it needs: game:read for what the area knows and hears, which "game": "read" in the manifest grants, and game:act for doing things in it as the player, which needs "game": "act" (see Permissions).
Overview
| Member | What it does | Plugins |
|---|---|---|
acknowledgeNotifications() | Marks the player's wall notifications seen (sendAcknowledgeNotificationRequest, ACK), the ones the client holds, as opening its notifications does. | game:act |
block() | Hides a post from the player for good (sendSetBlockedMessage, AMB); others still see it. | game:act |
blocked() | The ids of the posts the player has hidden, as the client holds them (myBlockedMessages). | game:read |
clear() | Clears every post off the player's own wall (sendClearAllMessages, CLW). | game:act |
countVisit() | Counts a visit to someone's wall (sendSetWallCounterIncrementRequest, wci). | game:act |
hasCountedVisit() | Whether a visit to someone's wall was counted this session (myViewedWalls). | game:read |
held() | The player's own wall as the client last read it, by its own timer or the wall opening, with nothing sent (_myInbox, _myNotifications, myWallParameters). | game:read |
like() | Likes someone's wall, by its owner's uuid, as its heart does (crp). | game:act |
likes() | How many have liked someone's wall, by its owner's uuid, and whether the player has (crg). | game:act |
parameters() | The player's own wall settings (decor, photo, status, masterpieces) as the client keeps them. | game:read |
permissions() | What the client's token for a wall lets the player do (tokenMap): read it, post on it. | game:read |
post() | Posts on a wall as the wall's own post button does (sendPutToPlayerWall, PUT): the client's own PostMessage, with the player's names, ids and the animal they wear. | game:act |
posts() | A wall's posts from the service (sendGetFromPlayerWall, GET), the player's own when no one is named: newest first, with the owner's unacknowledged posts on their own wall. | game:act |
privacy() | Who may post on the player's own wall (userInfo.playerWallSettings); null before login. | game:read |
privacyOf() | Who may post on someone's wall (sendGetWallSettingsRequest, wsg), the player's own by default. | game:act |
refreshBlocked() | Asks the service for the posts the player has hidden (sendGetBlockedMessages, GMB), and resolves with their ids; the client keeps them too (blocked()). | game:act |
remove() | Takes a post off a wall (sendDeleteFromPlayerWall, DEL), as its delete button does. | game:act |
removeMasterpieces() | Takes masterpieces down off the player's own wall (sendRemoveMasterpiece, RMP), by their inventory ids, as the wall's remove button does. | game:act |
requestPermissions() | Asks the server for a token to someone's wall (sendWallTokenRequest, wt), which the client keeps, and resolves with what it allows. | game:act |
serviceRequest() | Sends the wall service a request as it is written (sendServiceRequest), for a field the acts above do not send. | game:act |
setParameters() | Changes the player's own wall settings (sendSetWallParametersRequest, wps): read them with parameters(), change what is meant, send the whole back. | game:act |
setPrivacy() | Sets who may post on the player's own wall (sendSetWallSettingsRequest, wss). | game:act |
thread() | A wall's posts as it reads: newest first, each with its replies under it, oldest first. | game:act |
onAccess() | Hears every wall token handed over or refused (wt); the token itself is never told. | game:read |
onLike() | Hears the player like a wall (crp sent), by its owner's uuid, whoever pressed it. | game:read |
onParametersChange() | Hears the server answer a change to the player's wall settings (onParametersResponse). | game:read |
onPosts() | Hears every wall the service hands over (getResponse), whoever asked: posts, the wall opening, the client's own timer. | game:read |
onPrivacy() | Hears every answer to who may post on a wall (wsg). | game:read |
onPrivacyChange() | Hears the client keep (or not) who may post on the player's wall (onPrivacyResponse). | game:read |
onServiceRequest() | Hears every request the client makes of the wall service (sendServiceRequest), its own timer's and these acts' included, with its token left out. | game:read |
onVisitCounted() | Hears a visit to a wall counted, or not (onWallCountIncrementResponse). | game:read |
playerWall.window: The walls on screen: phantom.aj.playerWall.window.
| Member | What it does | Plugins |
|---|---|---|
close() | Closes every wall on screen (closeWalls). | game:act |
hasOpenedOwn() | Whether the player has opened their own wall this session (isFirstTime is false). | game:read |
isOwnOpen() | Whether the player's own wall is open (isMyWallOpen). | game:read |
open() | Opens someone else's wall as a buddy card's wall button does (openStrangersPlayerWall), which counts a visit, and resolves once it is on screen. | game:act |
openOwn() | Opens the player's own wall as the HUD's wall button does (playerWallBtnDownHandler), and resolves once it is on screen. | game:act |
owner() | Whose wall is in front, by account name (ownerNameOfCurrentOpenWall); null for none. | game:read |
postStyle() | The colour and pattern the player's next post is written in: the ones picked on the wall in front (PlayerWallGui._myCurrColorId, _currPatternId), or with none open the ones the next wall opens with (_currentMessageColorId, _currentMessagePattern). | game:act |
setPostStyle() | Picks the colour and pattern the player's posts are written in, as the wall's pickers do: on every wall open (redrawn as onSelectColor / onSelectPattern redraw them), for the next wall to open, and saved to the player's settings (setSharedObj('msgColor' | 'msgPattern')). | game:act |
showPostAs() | Shows other words in place of one post on the wall in front (processMessageUpdate), on this screen only: reading the wall again brings back the post. | game:act |
playerWall.checks: The client checking walls: phantom.aj.playerWall.checks.
| Member | What it does | Plugins |
|---|---|---|
background() | The client's background check of the player's own wall, read from its timer. | game:read |
check() | Asks whether a wall has anything new (sendCheckPlayerWall, CHK), the player's own by default. | game:act |
pause() | Pauses the client's background check (reset(), as the client itself puts it down), and resolves with what starts it again. | game:act |
quietWhenUnavailable() | Pauses the client's background check the first time the service refuses it for one of reasons (unavailable by default), and says so: a refused wall otherwise costs a request and a popup every minute all session. | game:act |
resume() | Starts the client's background check (start()), as an answered check does: after pause, or after a refusal the client never starts it again for. | game:act |
setEvery() | Sets the gap between background checks, in milliseconds (delay; 60000 as the client builds it), at least 5000 so a plugin cannot flood the service. | game:act |
onBackgroundChange() | Hears the background check change: paused, started again, its gap changed, the timer made or dropped. | game:read |
onUnavailable() | Hears the wall service refuse a check (onCheckResponse), whoever asked: whose wall, the reason, and whether the client's own timer asked. | game:read |
Methods
acknowledgeNotifications
acknowledgeNotifications(options?: ActOptions) => Promise<number>Marks the player's wall notifications seen (sendAcknowledgeNotificationRequest, ACK), the ones the client holds, as opening its notifications does. Resolves with how many: 0 when there were none, with nothing sent.
Parameters
| Name | Type | |
|---|---|---|
options optional | ActOptions |
Returns
Promise<number>
Types
block
block(msgId: string, options?: ActOptions) => Promise<void>Hides a post from the player for good (sendSetBlockedMessage, AMB); others still see it.
Parameters
| Name | Type | |
|---|---|---|
msgId | string | |
options optional | ActOptions |
Returns
Promise<void>
Types
blocked
blocked() => Promise<string[]>The ids of the posts the player has hidden, as the client holds them (myBlockedMessages).
Returns
Promise<string[]>
clear
clear(options?: ActOptions) => Promise<void>Clears every post off the player's own wall (sendClearAllMessages, CLW). Cannot be undone.
Parameters
| Name | Type | |
|---|---|---|
options optional | ActOptions |
Returns
Promise<void>
Types
countVisit
countVisit(userName: string, options?: ActOptions) => Promise<void>Counts a visit to someone's wall (sendSetWallCounterIncrementRequest, wci).
Parameters
| Name | Type | |
|---|---|---|
userName | string | |
options optional | ActOptions |
Returns
Promise<void>
Types
hasCountedVisit
hasCountedVisit(userName: string) => Promise<boolean>Whether a visit to someone's wall was counted this session (myViewedWalls).
Parameters
| Name | Type | |
|---|---|---|
userName | string |
Returns
Promise<boolean>
held
held() => Promise<HeldWall>The player's own wall as the client last read it, by its own timer or the wall opening, with nothing sent (_myInbox, _myNotifications, myWallParameters). As fresh as the client's last read; posts() asks the service.
Returns
Promise<HeldWall>
Types
like
like(ownerUuid: string, options?: ActOptions) => Promise<void>Likes someone's wall, by its owner's uuid, as its heart does (crp). Cannot be taken back.
Parameters
| Name | Type | |
|---|---|---|
ownerUuid | string | |
options optional | ActOptions |
Returns
Promise<void>
Types
likes
likes(ownerUuid: string, options?: ActOptions) => Promise<WallLikes>How many have liked someone's wall, by its owner's uuid, and whether the player has (crg).
Parameters
| Name | Type | |
|---|---|---|
ownerUuid | string | |
options optional | ActOptions |
Returns
Promise<WallLikes>
Types
parameters
parameters() => Promise<WallValue>The player's own wall settings (decor, photo, status, masterpieces) as the client keeps them.
Returns
Promise<WallValue>
Types
permissions
permissions(userName: string) => Promise<WallPermissions>What the client's token for a wall lets the player do (tokenMap): read it, post on it. Not known for a wall the client has not touched; requestPermissions asks.
Parameters
| Name | Type | |
|---|---|---|
userName | string |
Returns
Promise<WallPermissions>
Types
post
post(owner: string, message: string, options?: WallPostOptions) => Promise<WallPost>Posts on a wall as the wall's own post button does (sendPutToPlayerWall, PUT): the client's own PostMessage, with the player's names, ids and the animal they wear. Resolves with the post as the service kept it (its msgId and time). Throws REFUSED with the reason: the chat filter, a wall the player may not post on, a wall unavailable.
Parameters
| Name | Type | |
|---|---|---|
owner | string | |
message | string | |
options optional | WallPostOptions |
Returns
Promise<WallPost>
Types
Example
const [newest] = (await phantom.aj.playerWall.posts('friend')).posts;
if (newest) await phantom.aj.playerWall.post('friend', 'agreed', { replyTo: newest.msgId });posts
posts(userName?: string | undefined, options?: ActOptions) => Promise<WallContents>A wall's posts from the service (sendGetFromPlayerWall, GET), the player's own when no one is named: newest first, with the owner's unacknowledged posts on their own wall. Throws REFUSED with the service's reason when there is no wall to read.
Parameters
| Name | Type | |
|---|---|---|
userName optional | string | undefined | |
options optional | ActOptions |
Returns
Promise<WallContents>
Types
privacy
privacy() => Promise<WallPrivacy | null>Who may post on the player's own wall (userInfo.playerWallSettings); null before login.
Returns
Promise<WallPrivacy \| null>
privacyOf
privacyOf(userName?: string | undefined, options?: ActOptions) => Promise<WallPrivacy>Who may post on someone's wall (sendGetWallSettingsRequest, wsg), the player's own by default.
Parameters
| Name | Type | |
|---|---|---|
userName optional | string | undefined | |
options optional | ActOptions |
Returns
Promise<WallPrivacy>
Types
refreshBlocked
refreshBlocked(options?: ActOptions) => Promise<string[]>Asks the service for the posts the player has hidden (sendGetBlockedMessages, GMB), and resolves with their ids; the client keeps them too (blocked()).
Parameters
| Name | Type | |
|---|---|---|
options optional | ActOptions |
Returns
Promise<string[]>
Types
remove
remove(owner: string, msgId: string, options?: ActOptions) => Promise<void>Takes a post off a wall (sendDeleteFromPlayerWall, DEL), as its delete button does.
Parameters
| Name | Type | |
|---|---|---|
owner | string | |
msgId | string | |
options optional | ActOptions |
Returns
Promise<void>
Types
removeMasterpieces
removeMasterpieces(invIds: readonly number[], options?: ActOptions) => Promise<void>Takes masterpieces down off the player's own wall (sendRemoveMasterpiece, RMP), by their inventory ids, as the wall's remove button does. The paintings themselves are kept.
Parameters
| Name | Type | |
|---|---|---|
invIds | readonly number[] | |
options optional | ActOptions |
Returns
Promise<void>
Types
requestPermissions
requestPermissions(userName: string, options?: ActOptions) => Promise<WallPermissions>Asks the server for a token to someone's wall (sendWallTokenRequest, wt), which the client keeps, and resolves with what it allows. Throws REFUSED when the server gives none.
Parameters
| Name | Type | |
|---|---|---|
userName | string | |
options optional | ActOptions |
Returns
Promise<WallPermissions>
Types
serviceRequest
serviceRequest(command: string, fields?: { [key: string]: WallValue; }, options?: ActOptions & { userName?: string | undefined; }) => Promise<void>Sends the wall service a request as it is written (sendServiceRequest), for a field the acts above do not send. The client's token for userName's wall (the player's own by default) is filled in as t unless given, and never read out. Resolves once the service has answered; the answer goes to the client's own handler for the command.
Parameters
| Name | Type | |
|---|---|---|
command | string | |
fields optional | { [key: string]: WallValue; } | |
options optional | ActOptions & { userName?: string | undefined; } |
Returns
Promise<void>
Types
setParameters
setParameters(parameters: WallValue, options?: ActOptions) => Promise<WallValue>Changes the player's own wall settings (sendSetWallParametersRequest, wps): read them with parameters(), change what is meant, send the whole back. Everyone opening the wall sees it. Resolves with the settings the client keeps afterwards.
Parameters
| Name | Type | |
|---|---|---|
parameters | WallValue | |
options optional | ActOptions |
Returns
Promise<WallValue>
Types
setPrivacy
setPrivacy(setting: WallPrivacy, options?: ActOptions) => Promise<WallPrivacy>Sets who may post on the player's own wall (sendSetWallSettingsRequest, wss).
Parameters
| Name | Type | |
|---|---|---|
setting | WallPrivacy | |
options optional | ActOptions |
Returns
Promise<WallPrivacy>
Types
thread
thread(userName?: string | undefined, options?: ActOptions) => Promise<WallThreadPost[]>A wall's posts as it reads: newest first, each with its replies under it, oldest first.
Parameters
| Name | Type | |
|---|---|---|
userName optional | string | undefined | |
options optional | ActOptions |
Returns
Promise<WallThreadPost[]>
Types
Events
onAccess
onAccess(listener: (access: WallAccess) => void) => () => voidHears every wall token handed over or refused (wt); the token itself is never told.
Parameters
| Name | Type | |
|---|---|---|
listener | (access: WallAccess) => void |
Returns
() => void. Call it to stop listening.
Types
onLike
onLike(listener: (like: { ownerUuid: string; }) => void) => () => voidHears the player like a wall (crp sent), by its owner's uuid, whoever pressed it.
Parameters
| Name | Type | |
|---|---|---|
listener | (like: { ownerUuid: string; }) => void |
Returns
() => void. Call it to stop listening.
onParametersChange
onParametersChange(listener: (change: { parameters: WallValue; ok: boolean; }) => void) => () => voidHears the server answer a change to the player's wall settings (onParametersResponse).
Parameters
| Name | Type | |
|---|---|---|
listener | (change: { parameters: WallValue; ok: boolean; }) => void |
Returns
() => void. Call it to stop listening.
Types
onPosts
onPosts(listener: (wall: WallContents & { fromBackgroundCheck: boolean; }) => void) => () => voidHears every wall the service hands over (getResponse), whoever asked: posts, the wall opening, the client's own timer.
Parameters
| Name | Type | |
|---|---|---|
listener | (wall: WallContents & { fromBackgroundCheck: boolean; }) => void |
Returns
() => void. Call it to stop listening.
Types
onPrivacy
onPrivacy(listener: (setting: WallPrivacy) => void) => () => voidHears every answer to who may post on a wall (wsg). The answer names no wall.
Parameters
| Name | Type | |
|---|---|---|
listener | (setting: WallPrivacy) => void |
Returns
() => void. Call it to stop listening.
Types
onPrivacyChange
onPrivacyChange(listener: (change: { setting: WallPrivacy; ok: boolean; }) => void) => () => voidHears the client keep (or not) who may post on the player's wall (onPrivacyResponse).
Parameters
| Name | Type | |
|---|---|---|
listener | (change: { setting: WallPrivacy; ok: boolean; }) => void |
Returns
() => void. Call it to stop listening.
Types
onServiceRequest
onServiceRequest(listener: (request: WallServiceRequest) => void) => () => voidHears every request the client makes of the wall service (sendServiceRequest), its own timer's and these acts' included, with its token left out. No packet carries them.
Parameters
| Name | Type | |
|---|---|---|
listener | (request: WallServiceRequest) => void |
Returns
() => void. Call it to stop listening.
Types
onVisitCounted
onVisitCounted(listener: (visit: { userName: string; ok: boolean; }) => void) => () => voidHears a visit to a wall counted, or not (onWallCountIncrementResponse).
Parameters
| Name | Type | |
|---|---|---|
listener | (visit: { userName: string; ok: boolean; }) => void |
Returns
() => void. Call it to stop listening.
playerWall.window
The walls on screen: phantom.aj.playerWall.window. Opening the player's own wall or someone else's as the HUD button and a buddy card do, closing them, and the colour and pattern posts are written in. The player's own wall is PlayerWallManager._myPlayerWall, anyone else's _strangersPlayerWall, drawn over it; both PlayerWallGui.
close
close(options?: ActOptions) => Promise<void>Closes every wall on screen (closeWalls). Nothing is sent.
Parameters
| Name | Type | |
|---|---|---|
options optional | ActOptions |
Returns
Promise<void>
Types
hasOpenedOwn
hasOpenedOwn() => Promise<boolean>Whether the player has opened their own wall this session (isFirstTime is false).
Returns
Promise<boolean>
isOwnOpen
isOwnOpen() => Promise<boolean>Whether the player's own wall is open (isMyWallOpen).
Returns
Promise<boolean>
open
open(userName: string, options: OpenWallOptions) => Promise<void>Opens someone else's wall as a buddy card's wall button does (openStrangersPlayerWall), which counts a visit, and resolves once it is on screen. The client wants the owner's uuid.
Parameters
| Name | Type | |
|---|---|---|
userName | string | |
options | OpenWallOptions |
Returns
Promise<void>
Types
openOwn
openOwn(options?: ActOptions) => Promise<void>Opens the player's own wall as the HUD's wall button does (playerWallBtnDownHandler), and resolves once it is on screen. Throws REFUSED where the button would show a popup instead: walls switched off for the account, or no membership.
Parameters
| Name | Type | |
|---|---|---|
options optional | ActOptions |
Returns
Promise<void>
Types
owner
owner() => Promise<string | null>Whose wall is in front, by account name (ownerNameOfCurrentOpenWall); null for none.
Returns
Promise<string \| null>
postStyle
postStyle() => Promise<WallPostStyle>The colour and pattern the player's next post is written in: the ones picked on the wall in front (PlayerWallGui._myCurrColorId, _currPatternId), or with none open the ones the next wall opens with (_currentMessageColorId, _currentMessagePattern). Both count from 1.
Returns
Promise<WallPostStyle>
Types
setPostStyle
setPostStyle(style: Partial<WallPostStyle>, options?: ActOptions) => Promise<WallPostStyle>Picks the colour and pattern the player's posts are written in, as the wall's pickers do: on every wall open (redrawn as onSelectColor / onSelectPattern redraw them), for the next wall to open, and saved to the player's settings (setSharedObj('msgColor' | 'msgPattern')). Resolves with the style now held.
Parameters
| Name | Type | |
|---|---|---|
style | Partial<WallPostStyle> | |
options optional | ActOptions |
Returns
Promise<WallPostStyle>
Types
showPostAs
showPostAs(msgId: string, text: string, options?: ActOptions) => Promise<void>Shows other words in place of one post on the wall in front (processMessageUpdate), on this screen only: reading the wall again brings back the post.
Parameters
| Name | Type | |
|---|---|---|
msgId | string | |
text | string | |
options optional | ActOptions |
Returns
Promise<void>
Types
playerWall.checks
The client checking walls: phantom.aj.playerWall.checks. A check (CHK) asks whether a wall has anything new. The client checks the player's own wall every minute while it is shut (PlayerWallManager._myPlayerWallClosedTimer), so the HUD's wall button can glow; each firing resets the timer and sends a check, and only an answer starts it again (onCheckResponse). A wall the service refuses puts the "Jammer Wall unavailable" popup up for each refused check.
background
background() => Promise<WallBackgroundCheck>The client's background check of the player's own wall, read from its timer.
Returns
Promise<WallBackgroundCheck>
Types
check
check(userName?: string | undefined, options?: ActOptions) => Promise<WallCheck>Asks whether a wall has anything new (sendCheckPlayerWall, CHK), the player's own by default. Throws REFUSED with the service's reason (unavailable, token).
Parameters
| Name | Type | |
|---|---|---|
userName optional | string | undefined | |
options optional | ActOptions |
Returns
Promise<WallCheck>
Types
pause
pause(options?: ActOptions) => Promise<() => Promise<void>>Pauses the client's background check (reset(), as the client itself puts it down), and resolves with what starts it again. While paused the HUD's wall button stops glowing for new posts; opening and posting still work. Nothing is sent to Animal Jam.
Parameters
| Name | Type | |
|---|---|---|
options optional | ActOptions |
Returns
Promise<() => Promise<void>>
Types
Example
quietWhenUnavailable
quietWhenUnavailable(options?: { reasons?: readonly string[] | undefined; }) => Promise<QuietWall>Pauses the client's background check the first time the service refuses it for one of reasons (unavailable by default), and says so: a refused wall otherwise costs a request and a popup every minute all session. The popups already up stay up. Stopping it puts the check back if it paused it.
Parameters
| Name | Type | |
|---|---|---|
options optional | { reasons?: readonly string[] | undefined; } |
Returns
Promise<QuietWall>
Types
Example
const quiet = await phantom.aj.playerWall.checks.quietWhenUnavailable();
quiet.onQuiet(({ userName }) => console.log(`stopped checking ${userName}'s wall`));resume
resume(options?: ActOptions) => Promise<void>Starts the client's background check (start()), as an answered check does: after pause, or after a refusal the client never starts it again for. Resolves once it is counting down.
Parameters
| Name | Type | |
|---|---|---|
options optional | ActOptions |
Returns
Promise<void>
Types
setEvery
setEvery(everyMs: number, options?: ActOptions) => Promise<number>Sets the gap between background checks, in milliseconds (delay; 60000 as the client builds it), at least 5000 so a plugin cannot flood the service. Resolves with the gap now held.
Parameters
| Name | Type | |
|---|---|---|
everyMs | number | |
options optional | ActOptions |
Returns
Promise<number>
Types
onBackgroundChange
onBackgroundChange(listener: (check: WallBackgroundCheck, previous: WallBackgroundCheck | null) => void) => () => voidHears the background check change: paused, started again, its gap changed, the timer made or dropped. Nothing in the client announces it, so the timer is read every thirtieth frame.
Parameters
| Name | Type | |
|---|---|---|
listener | (check: WallBackgroundCheck, previous: WallBackgroundCheck | null) => void |
Returns
() => void. Call it to stop listening.
Types
onUnavailable
onUnavailable(listener: (refusal: WallUnavailable) => void) => () => voidHears the wall service refuse a check (onCheckResponse), whoever asked: whose wall, the reason, and whether the client's own timer asked. Answered checks are not told.
Parameters
| Name | Type | |
|---|---|---|
listener | (refusal: WallUnavailable) => void |
Returns
() => void. Call it to stop listening.
Types
Types
The types the calls above take and give, with every field. Import any of them in a plugin from @phantomclient/plugin/sdk, or use them as they are in a script.
HeldWall
The player's own wall as the client last read it, by its own timer or the wall opening.
| Field | Type | |
|---|---|---|
owner | string | Whose wall it is, by account name. |
posts | WallPost[] | The posts on it, newest first. |
notifications | WallPost[] | The posts the owner has not acknowledged; only ever filled on the player's own wall. |
parameters | WallValue | The wall's own settings (its decor, photo, status, masterpieces), as the service keeps them. |
WallPost
A post on a wall (playerWall.PostMessage).
| Field | Type | |
|---|---|---|
msgId | string | The post's own id, which names it to delete, block or reply to. |
parentMessageId | string | null | The post this one replies to, or null for a post of its own. |
message | string | What it says. A phrase picked from the wall's list is posted as its words. |
senderUserName | string | |
senderModeratedUserName | string | The sender's name as the wall shows it: "Jammer" where the name is not approved. |
senderDbId | number | null | |
senderUuid | string | null | |
postTime | number | When it was posted, in milliseconds since the epoch. |
isBuddy | boolean | Whether the sender is the player or one of their buddies, as the client works it out. |
isRead | boolean | |
colorId | number | The post's colour and pattern, counting from 1. |
patternId | number | |
language | number | The language it was written in (LocalizationManager.currentLanguage of the sender). |
avTypeId | number | null | The animal the sender wore, which the wall draws beside the post. |
customAvId | number | null |
WallValue
Plain data from the wall service, with nothing left in Flash.
type WallValue = string | number | boolean | null | WallValue[] | { [key: string]: WallValue }WallPermissions
What the client's token for a wall says the player may do there.
| Field | Type | |
|---|---|---|
known | boolean | Whether a token is held (or was given). |
read | boolean | |
write | boolean |
ActOptions
How long something that acts may take, and what may end it first.
| Field | Type | |
|---|---|---|
timeoutMs optional | number | undefined | 10 seconds by default. |
signal optional | AbortSignal | undefined |
WallContents
A wall as the service handed it over.
| Field | Type | |
|---|---|---|
owner | string | Whose wall it is, by account name. |
posts | WallPost[] | The posts on it, newest first. |
notifications | WallPost[] | The posts the owner has not acknowledged; only ever filled on the player's own wall. |
parameters | WallValue | The wall's own settings (its decor, photo, status, masterpieces), as the service keeps them. |
updatedAt | number | null | When the wall last changed, as the service counts it; null when it did not say. |
WallThreadPost
A post as thread gives it: the replies to it underneath, oldest first.
type WallThreadPost = WallPost & { replies: WallThreadPost[] }WallPostOptions
What a post carries besides its text.
type WallPostOptions = ActOptions & {
/** The post's colour, from 1; the player's own choice (`window.postStyle`) when left out. */
colorId?: number;
/** The post's pattern, from 1; the player's own choice when left out. */
patternId?: number;
/** The post this one replies to, by its `msgId`. */
replyTo?: string;
/**
* The wall's settings, sent with the post as the wall's own button sends its copy. Left out, the
* player's own settings (`parameters()`) go with a post on their own wall, and nothing with
* anyone else's.
*/
parameters?: WallValue;
}WallPrivacy
Who may post on a wall: 0 nobody, 1 buddies, 2 anybody (WALL_PRIVACY).
type WallPrivacy = (typeof WALL_PRIVACY)[keyof typeof WALL_PRIVACY]WallLikes
How many have liked a wall, and whether the player has.
| Field | Type | |
|---|---|---|
count | number | |
liked | boolean |
WallAccess
A token handed over or refused by the server (wt).
| Field | Type | |
|---|---|---|
userName | string | null | Whose wall; null for a refusal, which names nobody. |
granted | boolean | |
result | string | 1 when granted; -1, -2 (each with a popup of its own) or another for a refusal. |
read | boolean | |
write | boolean |
WallServiceRequest
What one wall service request carried, as the client sent it, without its token.
| Field | Type | |
|---|---|---|
command | string | GET, CHK, PUT, DEL, GMB, AMB, CLW, RMP or ACK. |
fields | { [key: string]: WallValue; } |
OpenWallOptions
Opening someone else's wall.
type OpenWallOptions = ActOptions & {
/** The owner's uuid, which the client needs (a buddy carries it). */
uuid: string;
/** Their name as the game shows it; `userName` when left out. */
moderatedUserName?: string;
/** A post to scroll to, as a notification does. */
jumpTo?: string;
}WallPostStyle
A post's colour and pattern, counting from 1.
| Field | Type | |
|---|---|---|
colorId | number | |
patternId | number |
WallCheck
The answer to a wall check (CHK).
| Field | Type | |
|---|---|---|
updatedAt | number | null | When the wall last changed, as the service counts it; null when it did not say. |
data | WallValue | The whole answer, as the service sent it. |
WallBackgroundCheck
The client's background check of the player's own wall (_myPlayerWallClosedTimer).
| Field | Type | |
|---|---|---|
present | boolean | Whether the client has the timer: false before the HUD is built and after leaving the world. |
running | boolean | Whether it is counting down. The client resets it before each check and starts it again only when an answer comes, so it is false while a check is in flight and after a refusal. |
everyMs | number | The gap between checks, in milliseconds: 60000 as the client builds it; 0 with no timer. |
WallUnavailable
A wall check the service refused, as the client heard it (onCheckResponse).
| Field | Type | |
|---|---|---|
userName | string | Whose wall was asked about. |
reason | string | unavailable (the "Jammer Wall unavailable" popup), token (fetched again), or another. |
fromBackgroundCheck | boolean | Whether the client's own background timer asked. |
QuietWall
Going quiet on a wall the service refuses, as quietWhenUnavailable gives it: callable (or stop()) to listen no more and put the client's check back if it was paused.
type QuietWall = Running<{
/** The refusal that paused the check, or null while none has. */
readonly quieted: WallUnavailable | null;
/** Hears each refusal it went, or stayed, quiet for. */
onQuiet(listener: (refusal: WallUnavailable) => void): () => void;
}>