MCPcopy
hub / github.com/tinode/chat / msgOpts2storeOpts

Function msgOpts2storeOpts

server/utils.go:148–162  ·  view source on GitHub ↗

Takes MsgClientGet query parameters, returns database query parameters

(req *MsgGetOpts)

Source from the content-addressed store, hash-verified

146
147// Takes MsgClientGet query parameters, returns database query parameters
148func msgOpts2storeOpts(req *MsgGetOpts) *types.QueryOpt {
149 var opts *types.QueryOpt
150 if req != nil {
151 opts = &types.QueryOpt{
152 User: types.ParseUserId(req.User),
153 Topic: req.Topic,
154 IfModifiedSince: req.IfModifiedSince,
155 Limit: req.Limit,
156 Since: req.SinceId,
157 Before: req.BeforeId,
158 IdRanges: rangeSerialize(req.IdRanges),
159 }
160 }
161 return opts
162}
163
164// Check if the interface contains a string with a single Unicode Del control character.
165func isNullValue(i any) bool {

Callers 3

replyGetSubMethod · 0.85
replyGetDataMethod · 0.85
replyGetDelMethod · 0.85

Calls 2

ParseUserIdFunction · 0.92
rangeSerializeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…