Unless they release the server code, no, you can't build your own "Telegram" yet. The original article's title was misleading, thankfully the HN submission title was amended to correct it. Still useful of course for anyone creating third-party clients, but an entirely different matter.
We're building an MIT/ZLIB/Apache2 Open Source End-to-End Encrypted alternative that is a fully P2P decentralized app (dApp), see: https://hackernoon.com/so-you-want-to-build-a-p2p-twitter-wi... !
Currently it supports signed/verified messages, haven't added cyphered/private messages yet to the API, but it is available in the SEA (Security, Encryption, Authorization) utility library underneath - but that should be coming soon, and of course love any contributions!
Also, the "server" has no special application logic on it, it is just another peer in the network that can help with WebRTC signaling or being a websocket relay. It cannot middleman the data, because every message is signed via the "client" (technically there are no server/clients, everybody is just a peer) using latest native Web Crypto API!
Here is a demo of an example social network app that is syncing character-by-character with cryptographically verifiable sources across a test network of real world devices: https://youtu.be/C3akdQJs55E
Again, all truly Open Source (ie, MIT/ZLIB/Apache2)!