MCPcopy Create free account
hub / github.com/tinode/chat / getMsg

Function getMsg

tn-cli/commands.py:210–227  ·  view source on GitHub ↗
(id, cmd, ignored)

Source from the content-addressed store, hash-verified

208
209# {get}
210def getMsg(id, cmd, ignored):
211 if not cmd.topic:
212 cmd.topic = tn_globals.DefaultTopic
213
214 what = []
215 if cmd.desc:
216 what.append("desc")
217 if cmd.sub:
218 what.append("sub")
219 if cmd.tags:
220 what.append("tags")
221 if cmd.data:
222 what.append("data")
223 if cmd.cred:
224 what.append("cred")
225 return pb.ClientMsg(get=pb.ClientGet(id=str(id), topic=cmd.topic,
226 query=pb.GetQuery(what=" ".join(what))),
227 extra=pack_extra(cmd))
228
229
230# {set}

Callers

nothing calls this directly

Calls 3

pack_extraFunction · 0.85
appendMethod · 0.80
GetQueryMethod · 0.45

Tested by

no test coverage detected