MCPcopy Create free account
hub / github.com/GetStream/stream-js / getOrCreate

Method getOrCreate

src/user.ts:147–149  ·  view source on GitHub ↗

* Get or Create a new user in stream * @link https://getstream.io/activity-feeds/docs/node/users_introduction/?language=js#adding-users * @param {object} data user date stored in stream * @return {Promise }

(data: StreamFeedGenerics['userType'])

Source from the content-addressed store, hash-verified

145 * @return {Promise<StreamUser>}
146 */
147 getOrCreate(data: StreamFeedGenerics['userType']) {
148 return this.create(data, { get_or_create: true });
149 }
150
151 /**
152 * Get the user profile, it includes the follow counts by default

Callers 2

profile.jsFile · 0.80
setUserMethod · 0.80

Calls 1

createMethod · 0.95

Tested by

no test coverage detected