DEV Community

Kelvin Wangonya
Kelvin Wangonya

Posted on

4 1

Progress: creating/deleting channels, switching active channel and chat history

My laptop died on me last week so things have been a bit slow. I have made a bit of progress since my last post though.

Creating/deleting channels

I added commands to enable creating and deleting channels.
/+channel channel_name creates a new channel.

newchan

/-channel channel_name deletes it.
delchan

Switching active channel

Now that we can create more channels, we'll likely want to switch between them to send messages to the right channel. Clicking on tab changes focus from the input field to the channels window. Channels are highlighted using the up and down keys and selected using enter.

Chat history

Selecting a new channel clears the screen and shows messages belonging to that channel. Chat history is saved in an in-memory sqlite3 database.

chat-history

Other changes

One more change I made was with the authentication. Previously, a user could log in from inside the app interface. Now, users have to log in to access the app.

auth1

After logging in for the first time, subsequent logins will be automatic.
auth2

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay