Skip to content

Commit 4e2d8cd

Browse files
committed
Rename meta.occupancy action to just meta
1 parent f119e61 commit 4e2d8cd

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

ably.d.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2758,21 +2758,25 @@ declare namespace MessageActions {
27582758
*/
27592759
type MESSAGE_CREATE = 'message.create';
27602760
/**
2761-
* Message action for an updated message.
2761+
* Message action for an updated message. The `serial` field identifies the message of which this is
2762+
* an update. The update will have a newer `version` compared with the original message.create message.
27622763
*/
27632764
type MESSAGE_UPDATE = 'message.update';
27642765
/**
2765-
* Message action for a deleted message.
2766+
* Message action for a deleted message. The `serial` field identifies the message which is being deleted.
2767+
* The delete will have a newer `version` compared with the original message.create message.
27662768
*/
27672769
type MESSAGE_DELETE = 'message.delete';
27682770
/**
2769-
* Message action for a meta-message that contains channel occupancy information.
2771+
* Message action for a meta-message (a message originating from ably rather than being explicitly
2772+
* published on a channel), containing eg inband channel occupancy events or some other information
2773+
* requested by channel param.
27702774
*/
2771-
type META_OCCUPANCY = 'meta.occupancy';
2775+
type META = 'meta';
27722776
/**
27732777
* Message action for a message containing the latest rolled-up summary of annotations
2774-
* that have been made to this message. The message.refSerial is the serial of the
2775-
* message for which this is a summary.
2778+
* that have been made to this message. Like an update, but only updates the summary, so
2779+
* the message.serial is the serial of the message for which this is a summary.
27762780
*/
27772781
type MESSAGE_SUMMARY = 'message.summary';
27782782
}
@@ -2784,7 +2788,7 @@ export type MessageAction =
27842788
| MessageActions.MESSAGE_CREATE
27852789
| MessageActions.MESSAGE_UPDATE
27862790
| MessageActions.MESSAGE_DELETE
2787-
| MessageActions.META_OCCUPANCY
2791+
| MessageActions.META
27882792
| MessageActions.MESSAGE_SUMMARY;
27892793

27902794
/**

src/common/lib/types/message.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,7 @@ import type RealtimeChannel from '../client/realtimechannel';
2020
import type ErrorInfo from './errorinfo';
2121
type Channel = RestChannel | RealtimeChannel;
2222

23-
const actions: API.MessageAction[] = [
24-
'message.create',
25-
'message.update',
26-
'message.delete',
27-
'meta.occupancy',
28-
'message.summary',
29-
];
23+
const actions: API.MessageAction[] = ['message.create', 'message.update', 'message.delete', 'meta', 'message.summary'];
3024

3125
function stringifyAction(action: number | undefined): string {
3226
return actions[action || 0] || 'unknown';

0 commit comments

Comments
 (0)