Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
348 views
in Technique[技术] by (71.8m points)

laravel - Notification for all private channels

I'm using Pusher for one-to-one real time messages between two people. This is my code when you are in the "room"

Echo.private('chat.'+this.roomid)
    .listen('MessageSent',(e)=>{
          this.allMessages.push(e.message)
          this.scrollBottom(this.messagesContainer);
    });

My question is how should be the logic when you are outside every chat and you want to show a number of new messages to you next to a message icon in the navigation? Should it be a different event that is not tied to a chat "room" but rather just to a user?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
...