Exemple #1
0
def setMsg(id, topic, user, fn, photo, private, auth, anon, mode):
    return pb.ClientMsg(set=pb.ClientSet(
        id=str(id),
        topic=topic,
        query=pb.SetQuery(desc=pb.SetDesc(default_acs=pb.DefaultAcsMode(
            auth=auth, anon=anon),
                                          public=make_vcard(fn, photo),
                                          private=private),
                          sub=pb.SetSub(user_id=user, mode=mode))))
Exemple #2
0
def setMsg(id, topic, user, fn, photo, public, private, auth, anon, mode, tags):
    if public == None:
        public = encode_to_bytes(make_vcard(fn, photo))
    else:
        public = encode_to_bytes(public)
    private = encode_to_bytes(private)
    return pb.ClientMsg(set=pb.ClientSet(id=str(id), topic=topic,
        query=pb.SetQuery(
            desc=pb.SetDesc(default_acs=pb.DefaultAcsMode(auth=auth, anon=anon),
                public=public, private=private),
        sub=pb.SetSub(user_id=user, mode=mode),
        tags=tags)))