josephg / josephg/ShareJS

Is it possible to store user (id/name) metadata in ShareJS 0.6.2?

Open
#286 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5k
Forks
454
PR merge metrics
No merged PRs in 30d

Description

I've been trying to figure out if it's possible to get an app-generated user ID to be stored in the `meta` field of the ops collection in ShareJS 0.6.2, and have been digging through the code. It appears as if this is not possible but I'd be happy corrected if someone who has more experience with this can let me know.
- When a user connects/authenticates, I assign `agent.name` with their userId.
- If they create a new document, this userId appears with `creator`.
- Ops by users seem to completely ignore this name. The only thing that shows up in `meta` is the pretty useless `source` field which is a randomly generated ID for each socket. It helps to distinguish users but makes it near impossible to tell who's who, especially when switching between documents.

Is there an easy way to just get the `name` field into the `meta` object as well?

Thanks!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.