Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

History
161 lines (85 loc) · 8.2 KB

File metadata and controls

161 lines (85 loc) · 8.2 KB

Major Campfire Modifications

We modified Campfire extensively to serve the needs of the Small Bets community. Below are some of the changes that may be interesting to anyone running a customized Campfire instance. Feel free to take any of our changes.

Mentions tab

Members can see the list of mentions easily from a new view in the sidebar.

Email notifications

Members get an email notification if they have an unread mention or direct message.

User counter

Members can see how many other people are in a room.

New since last visit

Members can catch up from where they left with a “since last visit” line, similar to Hey’s Feed feature.

Mark messages as unread

Members can mark a message as unread.

Email-based auth

Members can log in with their email instead of with a password.

Bookmarks

Members can bookmark messages, and the bookmarks can be seen from a new view in the sidebar.

One-click reboost

Members can quickly repeat someone else's boost just by clicking on it.

Mentions list relevance

As the number of members increased in the thousands, we started having many people with the same first name and it became increasingly harder to find the right person to mention. We addressed this by ranking the mentions list based on the recency of the person's last message.

Replies as mentions

We thought replies deserved the mention treatment. i.e. triggering a notification, vibrating pink bubble, and appearing in our new mentions tab.

Maintain scrollbar position in sidebar

When the number of rooms outgrew the sidebar height, switching between rooms caused the sidebar scroll position to reset to the top. This fix preserves the scroll position, but it still flickers for a brief split second.

Boost speed

We consolidated two server roundtrips into one, which made boosts feel quite a bit more snappy especially for members far away from our server.

Hide empty pings from sidebar

We noticed that whenever someone clicks on an avatar from the pings bar, a direct room gets created and that room lingers in the bar forever. This was causing an accumulation of avatars in the pings bar. We mitigated this by not showing empty direct rooms.

Updated names cache

When someone changes their name, their old name remained in the message fragments cache. This led to a few times where we couldn't find/mention the author of a recent message in the room. Our change cleans messages from the cache for the user who changes their info.

Threads

We found a neat implementation where threads are just special rooms with a parent message, and they disappear after 30 days of inactivity.

For us, threads work like message boards in Basecamp, and they've been great at this use case. We let members submit project pitches in Campfire and we have multiple rounds of feedback inside a thread. This lets us have all the correspondence in one place. Otherwise, we don't encourage thread use for general chatter.

Block pings

Members can block users from sending them direct messages. Admins can monitor which members are getting blocked.

Stats page

General stats and various activity leaderboards.

Rich-text messaging from mobile

This change enables rich-text options on mobile.

Soft deletion

Moved to soft deletion for accounts, bookmarks, boosts, memberships, messages, and rooms. This prevents destructive actions from untrusted members.

Bot API extras

Each bot offers an additional webhook that receives all message/boost/user events in Campfire, including DMs. This everything webhook has been useful to build an AI chatbot that knows everything that's going on, not just when it's mentioned. We also use the everything webhook for moderation, to check that nobody is spamming in pings or doing other suspicious things.

Bots can also properly mention users with a special notation @{user_id}. And bots can now also initiate a ping with anyone by POSTing to /rooms//directs with the user_ids in the payload. This is handy for welcome messages when a new person joins Campfire. The everything webhook already sends an event when a new user is created, and the bot can react to that with a ping.

Some API examples here.