feat: use same content topics across examples when possible
All examples do not connect to the same fleet at the moment so the gain is limited.
This commit is contained in:
parent
a895f2cc4d
commit
52a58ea845
|
@ -56,7 +56,7 @@
|
|||
const textInput = document.getElementById('textInput');
|
||||
const sendButton = document.getElementById('sendButton');
|
||||
|
||||
const ContentTopic = "/light-js/0/message/utf8";
|
||||
const ContentTopic = "/js-waku-examples/1/chat/utf8";
|
||||
let messages = []
|
||||
let unsubscribe;
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ interface MessageInterface {
|
|||
styleUrls: ["./messages.component.css"],
|
||||
})
|
||||
export class MessagesComponent implements OnInit {
|
||||
contentTopic: string = `/relay-angular-chat/1/chat/proto`;
|
||||
contentTopic: string = `/js-waku-examples/1/chat/proto`;
|
||||
messages: MessageInterface[] = [];
|
||||
messageCount: number = 0;
|
||||
waku!: WakuPrivacy;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
// Recommendation: `/dapp-name/version/functionality/codec`
|
||||
// We recommend to use protobuf as codec (`proto`), this demo uses utf-8
|
||||
// for simplicity's sake.
|
||||
const contentTopic = '/relay-demo/1/message/utf-8';
|
||||
const contentTopic = '/js-waku-examples/1/chat/utf8';
|
||||
|
||||
try {
|
||||
statusDiv.innerHTML = '<p>Starting</p>';
|
||||
|
|
|
@ -4,7 +4,7 @@ import protobuf from "protobufjs";
|
|||
import { createPrivacyNode } from "js-waku/lib/create_waku";
|
||||
import { waitForRemotePeer } from "js-waku/lib/wait_for_remote_peer";
|
||||
|
||||
const ContentTopic = `/relay-reactjs-chat/1/chat/proto`;
|
||||
const ContentTopic = `/js-waku-examples/1/chat/proto`;
|
||||
|
||||
const SimpleChatMessage = new protobuf.Type("SimpleChatMessage")
|
||||
.add(new protobuf.Field("timestamp", 1, "uint32"))
|
||||
|
|
Loading…
Reference in New Issue