MCPcopy Create free account
hub / github.com/daodst/chat / GetUsers

Method GetUsers

server/store/store.go:297–303  ·  view source on GitHub ↗

GetUsers loads subscriptions for topic plus loads user.Public

(appid uint32, topic string, opts *types.BrowseOpt)

Source from the content-addressed store, hash-verified

295
296// GetUsers loads subscriptions for topic plus loads user.Public
297func (TopicsObjMapper) GetUsers(appid uint32, topic string, opts *types.BrowseOpt) ([]types.Subscription, error) {
298 // Limit the number of subscriptions per topic
299 if opts == nil {
300 opts = &types.BrowseOpt{Limit: MAX_USERS_FOR_TOPIC}
301 }
302 return adaptr.UsersForTopic(appid, topic, opts)
303}
304
305// GetSubs loads a list of subscriptions to the given topic, user.Public is not loaded
306func (TopicsObjMapper) GetSubs(appid uint32, topic string, opts *types.BrowseOpt) ([]types.Subscription, error) {

Callers 1

replyGetSubMethod · 0.80

Calls 1

UsersForTopicMethod · 0.65

Tested by

no test coverage detected