Gocnak/Botnak

Username auto-completion fails sometimes

Closed this issue · 4 comments

I tried to test different theories (users with capital letters, mods vs viewers, etc) but I found no consensus. For some reason, the getUsers method in ChannelManager.java returns empty even though the user shows up in the Viewers list.
Here it is working:
image

And here it is failing:
image

Oh wait this is because the user object isn't created from the viewer list.

When the user talks, the User object is created. I figured this was helpful for when you open a viewer list of somebody with 1k+ viewers, you don't have an influx of Objects being made for people that could be potentially leaving by the next update.

Viewer lists are really just for seeing the user if they're in chat.

We can create the user either in UserManager or in ListenerName, but I figured you'd really only want the user objects of people that chat.

I think twitch follows this same methodology with their user mention -- that the person has to type in chat before you can @mention them.

So Botnak connects to a channel, and User objects are created real time as people chat? I can see a few of problems with that.

  1. When you first connect to a channel, auto-complete isn’t useful since you have to wait on others to chat.
  2. Like #1, auto-complete loses its utility in a quiet or slow chat.
  3. You may NEVER get autocomplete for the streamer’s own userid since they often don’t type in their own chat but rely on a mic for communication.

I'm going to test out some ideas with this today to see if it can be safely done in the background with some limits set up.

So we can probably compromise and have the UserManager heartbeat thread create user objects, so that way, if you know who is in chat, you'll have a reason to @mention them.

I could also make IRCViewer create the user object for the broadcaster of the channel you're joining, so you'll always be able to @mention them as well.