PubNub Live Chat Beta Testing


 
Thread Tools Search this Thread
The Lounge What is on Your Mind? PubNub Live Chat Beta Testing
# 43  
Old 05-09-2019
Why can't you just use the status callback's PNConnectedCategory as the place where you call hereNow? This event happens when you subscribe to a channel(s).

I thought I mentioned that in past replies but I probably am just confusing with another thread that I mentioned that on recently.

--- Post updated at 04:53 PM ---

Do I just set the initial presenceTimeout > 300, say 600 or maybe even 1200 seconds?

Sorry, missed this question.
No need to set any special presenceTimeout for an individual. If they are subscribed to a channel(s), they will remain subscribed and therefore present on the channel until they unsubscribe or network connection fail.

Not sure if that's what you mean, so clarify if I am not understanding the question/requirement.

Cheers
Craig

--- Post updated at 04:56 PM ---

Hmmm, I just replied to the other question you had (that I missed) and it didn't post up here.

Quote:
What's the best way to keep the user's chat session alive...
Nothing you need to set special for an individual user. Just being subscribed to the channel will keep them "active/alive" or present on the channel. Perhaps I am not understanding the actual requirement or some disconnect/timeout issue you are having when a user is not interacting in the chat?

--- Post updated at 04:57 PM ---

Haha - I see that my first attempt finally posted up.
This User Gave Thanks to pubnubcraig For This Post:
# 44  
Old 05-10-2019
Hey Craig,

It's running "much better" now, thanks to your great help.

I'm going to let it run for a week, look at the transaction, and then decide what do develop next.

Thanks again to PubNub for both great technology and amazing technical support.
# 45  
Old 05-10-2019
UserCP Screeching Frog 0.7608
  • Fixed initial presence issue with "self user" with the following Vue.js code:
  • Get PubNub: Generate Leave on TCP FIN or RST to FALSE (Set Back to TRUE)

Code:
computed: {
    myuuid() {
      if (vbchat) return vbchat;
      else if (pubnub.getUUID()) return pubnub.getUUID();
      else return "Me";
    },
   
   // .....
}

Template changes:

Code:
<div class="d-flex justify-content-around flex-wrap room">
    <div class="col-md-12 box">
        <div v-if="this.psoccupancy" class="neo-chat-title">Live Chat Participants: {{ this.psoccupancy}}</div>
        <div v-else class="neo-chat-title">Live Chat Participants</div>
        <div v-if="this.userlist" class="neo-chat-title">{{ this.userlist}}</div>
        <div v-else class="neo-chat-title">{{this.myuuid}}</div>
        <VueSteamChat :messages="this.msglist" @vue-steam-chat-on-message="onNewMessage" />
    </div>
</div>

# 46  
Old 05-10-2019
UserCP Screeching Frog 0.7609
  • Added new Vue.js code to update pubnub.hereNow() when we select and deselect the "Status" channel (bottom right)

Code:
<div v-if="this.userlist" class="neo-chat-title">
          <div  id="upped">{{this.updatedHN}}</div>
          <span id="occ">{{ this.userlist}}</span>
</div>

and

Code:
<input class="ckbox" type="checkbox" v-model="statusbox" @change="this.updateHereNow">

and

Code:
 methods: {
    updateHereNow() {
      if (!this.statusbox) {
        this.updatedHN = "Refreshing Occupancy";
        document.getElementById("occ").style.display = "none";
        document.getElementById("upped").style.display = "block";
        this.getHereNow();

        setTimeout(function() {
          document.getElementById("occ").style.display = "block";
          document.getElementById("upped").style.display = "none";
        }, 3000);
      }
    }

   // .....

}

.. something like that Smilie

UserCP Screeching Frog 0.7610
  • Moved this logic to the right of the "Status" channel selector using a "refresh" icon (bottom right).
  • Added some easy logic to make the icon greyish when updating.

UserCP Screeching Frog 0.7613
  • Minor CSS changes to the HereNow refresh icon and animation.

All looks good from an "efficiency of transaction" perspective in PubNub; so will test for a few more days and decide next steps.

Again, a big THANK YOU to PubNub and pubnubcraig for the great tech support. This has been by far the best support I have ever received from any JavaScript framework / library team. If anyone wants to build peer-to-peer apps on the net or are just interesting in learning publish-subscribe, I highly recommend PubNub because of their very good technical support and top shelf customer service.
# 47  
Old 05-12-2019
Now, I am creating two videos on this.

The first one is my first ever voice over screencast for users:

A Quick Video Overview of PubNub Live Chat @UNIX.com (version 0.7614)

The second will be a more technical discussion going over the highlights of the PubNub and Vue.js code in VSC.

Current version:

UserCP Screeching Frog 0.7616
  • Minor bug fixes in UI.
# 48  
Old 05-14-2019
UserCP Screeching Frog 0.7620
  • Minor changes to CSS
# 49  
Old 05-20-2019
UserCP Screeching Frog 0.7625
  • Testing changes to how Live Chat presence (participants list) is updated and refreshed.
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. What is on Your Mind?

Update: UserCP Screeching Frog 0.7641 - Changed Live Chat to Live Updates

Update: UserCP Screeching Frog 0.7641 - Changed Live Chat to Live Updates In this version of the UserCP, I have changed "Live Chat" to "Live Updates" by disabling the ability to post in the "live chat" area and changed the name to "Live Updates" The reason for this change is that experienced... (6 Replies)
Discussion started by: Neo
6 Replies

2. What is on Your Mind?

Live Chat (Alpha) in UserCP SF 0.7517

Interesting.... I am still working on the kinks for Live Chat here at unix.com using a publish-subscribe API from PubNub. Two days ago while working on it, a new user joined the live chat and asked about how to post a new thread in the forum. Then today, one of the members of the PubNub team... (23 Replies)
Discussion started by: Neo
23 Replies

3. What is on Your Mind?

A Quick Video Overview of PubNub Live Chat @UNIX.com (version 0.7614)

A number of people have asked me to make some videos, so I just got my first condenser microphone and so I can make some amateurish screen casts. I will try to do better in the future. A quick overview of PubNub Live Chat @unix.com The video is best is you set the Quality to HD 1080. The... (0 Replies)
Discussion started by: Neo
0 Replies

4. Solaris

Live Chat For Solaris?

Does anyone know of any online live chat discussion groups for Solaris? If so, please let me know... Thanks! Rob Sandifer (3 Replies)
Discussion started by: RobSand
3 Replies
Login or Register to Ask a Question