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.
Members can see the list of mentions easily from a new view in the sidebar.
- https://github.com/antiwork/smallbets/compare/f9b7ba3f98a7ea575e115c45bcfdb47cd46e48ae...53d8b1e742935800ee33cdf380e18571634909fa
- https://github.com/antiwork/smallbets/commit/d57db1930272978b36355aff8d28f56f9dfdd389
Members get an email notification if they have an unread mention or direct message.
Members can see how many other people are in a room.
Members can catch up from where they left with a “since last visit” line, similar to Hey’s Feed feature.
Members can mark a message as unread.
Members can log in with their email instead of with a password.
Members can bookmark messages, and the bookmarks can be seen from a new view in the sidebar.
Members can quickly repeat someone else's boost just by clicking on it.
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.
We thought replies deserved the mention treatment. i.e. triggering a notification, vibrating pink bubble, and appearing in our new mentions tab.
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.
We consolidated two server roundtrips into one, which made boosts feel quite a bit more snappy especially for members far away from our server.
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.
- https://github.com/antiwork/smallbets/commit/8ae11bc25e91234888f15739523166c65b268570
- https://github.com/antiwork/smallbets/commit/9d4a67dc5d5962b5ea702f1bc571fbadf71580f7
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.
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.
- https://github.com/antiwork/smallbets/commit/7caa8de1da8c5fbc82db0d4f57bca168656bf774
- https://github.com/antiwork/smallbets/compare/ddbc11f0f9fa65692dcd5eb00a87510037fa4a3e...f2e768ead19cd090a0ac0d883c9fe2a735bbdd2d
- https://github.com/antiwork/smallbets/commit/45576812b9cdb5caef387790fe65910230eccb1f
- https://github.com/antiwork/smallbets/compare/7333c40abc545c1900d4e23cfcef0fb557b2290e...9ad6e5d0a57957907a5911a30778212dabfa5e48
Members can block users from sending them direct messages. Admins can monitor which members are getting blocked.
General stats and various activity leaderboards.
This change enables rich-text options on mobile.
Moved to soft deletion for accounts, bookmarks, boosts, memberships, messages, and rooms. This prevents destructive actions from untrusted members.
- https://github.com/antiwork/smallbets/commit/cd4fb3c71729e630018a636e94819e1a0ded6ad3
- https://github.com/antiwork/smallbets/commit/bda3f96f7fa9f7ad1cdc82add617851dcf95a26c
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.