def getMsg(id, topic, desc, sub, tags, data): what = [] if desc: what.append("desc") if sub: what.append("sub") if tags: what.append("tags") if data: what.append("data") return pb.ClientMsg(get=pb.ClientGet( id=str(id), topic=topic, query=pb.GetQuery(what=" ".join(what))))
def getMsg(id, topic, desc, sub, tags, data): if not topic: topic = default_topic what = [] if desc: what.append("desc") if sub: what.append("sub") if tags: what.append("tags") if data: what.append("data") return pb.ClientMsg(get=pb.ClientGet(id=str(id), topic=topic, query=pb.GetQuery(what=" ".join(what))), on_behalf_of=default_user)
def getMsg(id, cmd, ignored): if not cmd.topic: cmd.topic = DefaultTopic what = [] if cmd.desc: what.append("desc") if cmd.sub: what.append("sub") if cmd.tags: what.append("tags") if cmd.data: what.append("data") return pb.ClientMsg(get=pb.ClientGet( id=str(id), topic=cmd.topic, query=pb.GetQuery(what=" ".join(what))), on_behalf_of=DefaultUser)