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

Method JudgeShouldAutoJoin

userapi/inthttp/client.go:125–139  ·  view source on GitHub ↗
(ctx context.Context, inviter, invitee string)

Source from the content-addressed store, hash-verified

123}
124
125func (h *httpUserInternalAPI) JudgeShouldAutoJoin(ctx context.Context, inviter, invitee string) (bool, error) {
126 if os.Getenv("CHAT_SERVER_MODE") != "chain" {
127 return true, nil
128 }
129 // 1,limit_mode fee() | any() | list())
130 inviterLocal, _, err := gomatrixserverlib.SplitID('@', inviter)
131 if err != nil {
132 return false, err
133 }
134 inviteeLocal, _, err := gomatrixserverlib.SplitID('@', invitee)
135 if err != nil {
136 return false, err
137 }
138 return new_feature.JudgeShouldAutoJoin(inviterLocal, inviteeLocal)
139}
140
141func (h *httpUserInternalAPI) InputAccountData(ctx context.Context, req *api.InputAccountDataRequest, res *api.InputAccountDataResponse) error {
142 span, ctx := opentracing.StartSpanFromContext(ctx, "InputAccountData")

Callers

nothing calls this directly

Calls 1

JudgeShouldAutoJoinMethod · 0.65

Tested by

no test coverage detected