Emit to self on send (#272)

* fix chat references in status-react

* emit to self on send
This commit is contained in:
Felicio Mununga 2022-06-13 20:07:00 +02:00 committed by GitHub
parent 5b4daedd37
commit f62e3ff014
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -42,6 +42,7 @@ class Client {
// '/dns4/node-01.do-ams3.wakuv2.test.statusim.net/tcp/8000/wss/p2p/16Uiu2HAmPLe7Mzm8TsYUubgCAW1aJoeFScxrLj8ppHFivPo97bUZ',
],
},
libp2p: { config: { pubsub: { enabled: true, emitSelf: true } } },
})
await waku.waitForRemotePeer()

View File

@ -77,14 +77,14 @@ export const ChatMessage = (props: Props) => {
const userProfileDialog = useDialog(UserProfileDialog)
const handleMessageSubmit = (message: string) => {
client.community.get(chatId).sendTextMessage(
client.community.chats.get(chatId).sendTextMessage(
message,
'0x0fa999097568d1fdcc39108a08d75340bd2cee5ec59c36799007150d0a9fc896'
)
}
const handleReaction = (reaction: Reaction) => {
client.community.get(chatId).sendReaction(chatId, messageId, reaction)
client.community.chats.get(chatId).sendReaction(chatId, messageId, reaction)
}
const handleReplyClick = () => {

View File

@ -82,7 +82,7 @@ export const Chat = () => {
const showMembers = enableMembers && state.showMembers
const handleMessageSubmit = (message: string) => {
client.community.get(chatId).sendTextMessage(
client.community.chats.get(chatId).sendTextMessage(
message
// '0x0fa999097568d1fdcc39108a08d75340bd2cee5ec59c36799007150d0a9fc896'
)