(id, cmd, ignored)
| 153 | |
| 154 | # {sub} |
| 155 | def subMsg(id, cmd, ignored): |
| 156 | if not cmd.topic: |
| 157 | cmd.topic = tn_globals.DefaultTopic |
| 158 | if cmd.get_query: |
| 159 | cmd.get_query = pb.GetQuery(what=" ".join(cmd.get_query.split(","))) |
| 160 | cmd.public = encode_to_bytes(makeTheCard(cmd.fn, cmd.note, cmd.photo)) |
| 161 | cmd.private = TINODE_DEL if cmd.private == DELETE_MARKER else encode_to_bytes(cmd.private) |
| 162 | return pb.ClientMsg(sub=pb.ClientSub(id=str(id), topic=cmd.topic, |
| 163 | set_query=pb.SetQuery( |
| 164 | desc=pb.SetDesc(public=cmd.public, private=cmd.private, |
| 165 | trusted=encode_to_bytes(parse_trusted(cmd.trusted)), |
| 166 | default_acs=pb.DefaultAcsMode(auth=cmd.auth, anon=cmd.anon)), |
| 167 | sub=pb.SetSub(mode=cmd.mode), |
| 168 | tags=cmd.tags.split(",") if cmd.tags else None), |
| 169 | get_query=cmd.get_query), |
| 170 | extra=pack_extra(cmd)) |
| 171 | |
| 172 | |
| 173 | # {leave} |
nothing calls this directly
no test coverage detected
searching dependent graphs…