tinode / chat

Instant messaging platform. Backend in Go. Clients: Swift iOS, Java Android, JS webapp, scriptable command line; chatbots
GNU General Public License v3.0
11.93k stars 1.87k forks source link

How to create just a p2p topics? #900

Closed iwhy closed 6 months ago

iwhy commented 6 months ago

my code here: ``
var topic1 = tinode.newTopicWith("usrFqGScSWNnDU"); topic1.isSubscribed = true;

print(topic1.isP2P()); print(topic1.private);

// var topic1 = tinode.getTopic(topicName: "dao_user_alice_vlog"); var pp = await tinode.subscribe( 'frank', MetaGetBuilder(topic1).withLaterSub(null).build(), //SetParams() SetParams( tags: ["travel", "vlog"], // desc: TopicDescription(), sub: TopicSubscription( user: tinode.getCurrentUserId(), online: true, topic: "frank", created: DateTime.now().toUtc(), // public: {"fn": "Frank Singer"}, ), ), );

print(pp);

// topic1. // topic1.invite("alice", "JRWS"); var msg2 = topic1.createMessage("my new message", false); await topic1.publishMessage(msg2);``

The code don't create the topic?

what shall i do to create a simple p2p topic?

or-else commented 6 months ago

Please use forum for questions.