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 textInput = document.getElementById('textInput');
|
||||||
const sendButton = document.getElementById('sendButton');
|
const sendButton = document.getElementById('sendButton');
|
||||||
|
|
||||||
const ContentTopic = "/light-js/0/message/utf8";
|
const ContentTopic = "/js-waku-examples/1/chat/utf8";
|
||||||
let messages = []
|
let messages = []
|
||||||
let unsubscribe;
|
let unsubscribe;
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ interface MessageInterface {
|
||||||
styleUrls: ["./messages.component.css"],
|
styleUrls: ["./messages.component.css"],
|
||||||
})
|
})
|
||||||
export class MessagesComponent implements OnInit {
|
export class MessagesComponent implements OnInit {
|
||||||
contentTopic: string = `/relay-angular-chat/1/chat/proto`;
|
contentTopic: string = `/js-waku-examples/1/chat/proto`;
|
||||||
messages: MessageInterface[] = [];
|
messages: MessageInterface[] = [];
|
||||||
messageCount: number = 0;
|
messageCount: number = 0;
|
||||||
waku!: WakuPrivacy;
|
waku!: WakuPrivacy;
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
// Recommendation: `/dapp-name/version/functionality/codec`
|
// Recommendation: `/dapp-name/version/functionality/codec`
|
||||||
// We recommend to use protobuf as codec (`proto`), this demo uses utf-8
|
// We recommend to use protobuf as codec (`proto`), this demo uses utf-8
|
||||||
// for simplicity's sake.
|
// for simplicity's sake.
|
||||||
const contentTopic = '/relay-demo/1/message/utf-8';
|
const contentTopic = '/js-waku-examples/1/chat/utf8';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
statusDiv.innerHTML = '<p>Starting</p>';
|
statusDiv.innerHTML = '<p>Starting</p>';
|
||||||
|
|
|
@ -4,7 +4,7 @@ import protobuf from "protobufjs";
|
||||||
import { createPrivacyNode } from "js-waku/lib/create_waku";
|
import { createPrivacyNode } from "js-waku/lib/create_waku";
|
||||||
import { waitForRemotePeer } from "js-waku/lib/wait_for_remote_peer";
|
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")
|
const SimpleChatMessage = new protobuf.Type("SimpleChatMessage")
|
||||||
.add(new protobuf.Field("timestamp", 1, "uint32"))
|
.add(new protobuf.Field("timestamp", 1, "uint32"))
|
||||||
|
|
Loading…
Reference in New Issue