During the Cloverleaf RISC OS project we will produce several software to support RISC OS. The first piece of software will be the instant messenger ChatCube to connect RISC OS users. But ChatCube will function also as client for other open source Messenger like Telegram or for messengers that provide an API to integrate from other plattforms.


Functions implemented

  • 1-to-1 Chat
  • Public RISCOS Support group chat
  • Group chat implemented
  • Send images and files
  • Profile image or avatar
  • Screenshot function with different options
  • Stickers
  • Taskbar notification about new messages
  • Telegram messenger client integrated
  • Delete and unsend message
  • Edit send messages
  • Save file
  • Reconnecting when internet connection lost
  • Sound notifications
  • Forward messages
  • Reply to message
  • List Item

Known bugs

  • Automatic memory resizing not implemented

Future extentions

  • Smilies
  • Location function that displays users nearby
  • Integrate Twitter
  • Integrate IRC
  • Integrate Facebook messenger
  • Integrate Jabber messenger
  • Voice call
  • Video call
  • Android app of ChatCube
  • iPhone app of ChatCube

Credits to for helping with testing and programming advice

  • Raik Fischer
  • Anton Reiser
  • Micheal Grundlitz
  • David Feugey
  • Rob Heaton
  • David Higton

Security implementations

Communication between our server and ChatCube client are encrypted by HTTPS.
Clients authourized by login/password and get auth SHA token which used in next requests for authentication.

Telegram client implementation

Right now we use official Telegram library (TDLib https://core.telegram.org/tdlib) on the server side.
It encrypts communication between our server and Telegram servers.
The “secure chats” is still not implemented, I think it can be implemented but it will be terminated on our server.

The Telegram messages are not stored in our MySQL db.
Telegram client uses own SQLITE db to store various account data. That Telegram db file encrypted on the file system. The encryption key for Telegram db is generated based on the hardcoded string and account phone number.
The Telegram db files stored in SHA hashed directories. SHA directory names stored in our MySQL db. It is impossible to say which db belongs to which member by looking on file system.

To compile Telegram client needs c++ compiler support latest standards. Gcc 4.7 does not supported.


Version updates

Implemented thumbnails for the uploaded sprites (file type 0xff9).
Implemented send email notification for unread messages and then configuration option for it. Configuration located at the “General” section of the “Settings”.
Fixed bug with automatic update.

Implemented profile info dialog. Click on the profile icon in the messages of select “View profile” menu entry in the private chat menu.
In the profile info the big profile photo opened by clicking on the photo’s thumbnail.
Optimized layout of messages to fit more information. Reduced margins, increased text message box width. Show member’s name on the top line of the message in group chat (in green color). Removed member’s name from avatar box.
Set “Accept-encoding” header for all download requests to enable compression for some content types, compression setting also configured at server and exclude compression for already compressed files.
Added button “Just quit from Chatcube” in the logout confirmation dialog.

Reimplementation of automatic update. Hope will run well.
Implemented logout confirmation dialog
Changed sort ordering in the “Forward message” dialog. Will sorted by “Last message” then by “Chat title”
Changed sort ordering of the “Online” sort mode. Sort by “Online” then by “Last message” then by “Chat title”

Implemented forward messages between different messengers. If a message forwarded to the same messengers then used an internal messenger’s “forward” function. If a message forwarded to different messengers them message content copied and only messages of types text, photo, file can be forwarded this way, stickers or other message types can’t be forwarded between different messengers.
Fix for Wimp sprites bug. Icons which used in the Iconbar seems must be present in the system aprite area. Put all icons used in the IconBar to the !Sprite which is then loaded with IconSprites command.

Fix Wimp sprite area. Do load only a single app icon into the Wimp sprite area using IconSprites command. All other app sprites moved to Sprites and loaded into the application sprite area.

Finally fixed bug with duplicate outgoing messages. Strip whitespace only at end of message. Don’t send empty messages with spaces only.

Fixed bug with duplicate outgoing messages

Fixed bug with ESC key in the dialogs with members list (Forward Message, Create New Chat, Invite members)

Removed online marker (red circle) from the chat groups in the chats list. Groups can’t be online or offline as some members can be online and some offline.
Change the color of the “edited” marker in the message to red.

Added “+” button on the top chatlist toolbar to create new chat.
Added quick filter in the “Forward message” dialog.

Implemented typing notify. The text “typing…” will be shown on the chats list instead of the last message text.
Implemented different chats list ordering (by online, by last message date, by chat title)
Implemented search for the chat. Search filter applied immediately to chats list.
Implemented automatic application update. Press the “Update” button in the “Settings->Version” and chat will be updated to the latest version. After updating previous version will be stored at “!Chatcube.update” directory. You can revert it back manually if needs.
Implemented “Manage group”, now can only change title and look at the group member list
Implemented “Invite members” in group. Button “Invite members” in the “Manage group” dialog.
Implemented “Edit message” feature. Editing can be canceled also without changes.
Implemented “Start hidden” option.

Fixed bug with duplicate messages when sending stickers.
Implemented Sound notification. Sounds stored in MP3 files and played using AMPlayer module from DigitalCD. May needs to install module from !System subdirectory in the ChatCube. Sounds turned on/off in the Settings -> Notification

Fixed problem with possible hangs when no Internet connection. It is caused by CURL hostname resolving as it is still blocking.
Implemented save and cache resolved addresses to avoid DNS resolving.

Fixed duplicate messages when sent to Telegram

Fixed problem with network connection (caused by changings at Cloudflare)!
Display error message when directory dragged into chat instead of ignoring. Chat can send only files.

Fixed download function
Fixed progress bar indication when downloading text files
Fixed progress bar for uploads

Fixed Screenshoot function.
Fixed error when directory dragged on chat. As we can’t attach directories then it will ignored instead of error.
Implemented show progress bar for long running operations in addition to hourglass percent show.
Implemented “forward message” function. It works by middle-button click on the message and select “Forward” from menu. Message can be forwarded to multiple recipients. The files and photos can be forwarded also.
Implemented support of two-factor (password protected) Telegram authorization.
Implemented unregister (unbind) Telegram account from ChatCube account. Button “Unregister Telegram account” located in the “Settings”.

Change place where to write cache and downloaded files. Now write to <Choices$Write>.ChatCube First start of this version may take significant time because needs to load avatars and stickers into new directory.
Implemented show chat window on new message if chat window was hidden. This option configured in the Settings.

Fixed problem with caching error responses in files download. Now if you select to download the file it will always loaded from server.
Fixed problem with UTF8 in the profile fields in the Edit Settings dialog.
Decreased connection timeout from 30 to 5 seconds. Hope it helps with faster reconnection and resubmit timed out request.

Fixed some errors at first Telegram account registration.
Fixed “Telegram Client not started” error sometimes happens at start
Fixed logout and next login under different account (events was come to previous account).
If Telegram account is not added yet then not allow to edit its data in the Edit Settings but offer to add Telegram account.
Fixed “Add messenger -> Telegram” menu item

Reconnection when internet connection is lost

Bug fixed for new registration


Handling for uploading profile photo or avatar reorganised

Bug fixed about displaying new message notification


Discovered WIMP polls bug of TBX library

Added editing of Telegram profile


Implemented “unsend” and “delete” message


Integrated TELEGRAM messenger client

Improved screenshot options with drag a rectangle to limit screesnhot to part of the display

New window redraw library on base of TBX library that is faster and use less memory


Added task bar notification of unread messages in chats

improved edit pages for profile

reduced Wimpslot to 28 MB so it runs on RPCEmu


Fixed problems with downloads

loading if chat history optimized
faster switching to other chats

remove background for stickers in the chat
fix segfault crash on sending messages
show hourglass at initial data loading

fix filenames when sending files
show big profile photo when click to avatar
fix bug with saving files

add icons for some popular file types
allow download attachments of all types
fix resize chat list bug on maximizing window
save login info to !Boot.Choices folder

add stickers
remove phone field from reset password form
fix segfault crash on opening attached images

fix displaying unread messages count
change cursor on hover clickable objects
show date in messages history
add possibility to receive and show broadcast alerts from server
minor bug fixes

fix displaying of groupchats
fixes for chatlist displaying when new messages received
window layout was changed
add mouse scroll support

small improvements and bug fixes

Add UTF-8 support.
Handle network connection problems.
Edit profile feature.

Add possibility to change the profile picture or select from predefined avatars