Skip to content

PresenceMessage.memberKey not exposed (TP3h) #2202

@paddybyers

Description

@paddybyers

Spec point

  • TP3h: `memberKey` is a "string function that combines the `connectionId` and `clientId` ensuring multiple connected clients with the same clientId are uniquely identifiable." It should be a method on `PresenceMessage`.

Observed behaviour

`memberKey` is not a method on `PresenceMessage`. It is computed internally as a lambda `(item) => item.clientId + ':' + item.connectionId` passed to `PresenceMap`, but not accessible to callers.

Failing test

Test Expected Actual
`TP3h - memberKey format` `typeof msg.memberKey === 'string'` `typeof msg.memberKey === 'undefined'`

Reproduction

```bash
RUN_DEVIATIONS=1 npx mocha --grep "TP3h" test/uts/rest/types/presence_message_types.test.ts
```

From PR #2191, branch `uts-rest`.

┆Issue is synchronized with this Jira Task by Unito

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working. It's clear that this does need to be fixed.uts-issueIssues raised there there is an apparent discrepancy between this library and the UTS tests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions