Margy Gram: форк Telegram для Android (раньше Margelet / Margy)
  • Java 86.9%
  • Python 13.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-16 21:04:47 +01:00
assets Margy Gram 2.0: music tab and player, streaks with a 3D tilcayo pet, exteraGram SDK, edit history, avatar shapes, patpat 2026-11-16 21:02:59 +01:00
docs Margy Gram 2.0: music tab and player, streaks with a 3D tilcayo pet, exteraGram SDK, edit history, avatar shapes, patpat 2026-11-16 21:02:59 +01:00
java Margy Gram 2.0: music tab and player, streaks with a 3D tilcayo pet, exteraGram SDK, edit history, avatar shapes, patpat 2026-11-16 21:02:59 +01:00
patch Margy Gram 2.0: music tab and player, streaks with a 3D tilcayo pet, exteraGram SDK, edit history, avatar shapes, patpat 2026-11-16 21:02:59 +01:00
python Margy Gram 2.0: music tab and player, streaks with a 3D tilcayo pet, exteraGram SDK, edit history, avatar shapes, patpat 2026-11-16 21:02:59 +01:00
res Margy Gram 2.0: music tab and player, streaks with a 3D tilcayo pet, exteraGram SDK, edit history, avatar shapes, patpat 2026-11-16 21:02:59 +01:00
server Margy Gram 2.0: music tab and player, streaks with a 3D tilcayo pet, exteraGram SDK, edit history, avatar shapes, patpat 2026-11-16 21:02:59 +01:00
tools Margy Gram 2.0: music tab and player, streaks with a 3D tilcayo pet, exteraGram SDK, edit history, avatar shapes, patpat 2026-11-16 21:02:59 +01:00
.gitignore Margelet 0.99.17, as it was in the last archive 2026-11-01 19:32:42 +03:00
ATTRIBUTION.md Margy Gram 2.0: music tab and player, streaks with a 3D tilcayo pet, exteraGram SDK, edit history, avatar shapes, patpat 2026-11-16 21:02:59 +01:00
badges.json Margy Gram 2.0: music tab and player, streaks with a 3D tilcayo pet, exteraGram SDK, edit history, avatar shapes, patpat 2026-11-16 21:02:59 +01:00
cats.json Margelet 0.99.17, as it was in the last archive 2026-11-01 19:32:42 +03:00
CLAUDE.md Margelet 0.99.17, as it was in the last archive 2026-11-01 19:32:42 +03:00
FEATURES.md Margy Gram 2.0: music tab and player, streaks with a 3D tilcayo pet, exteraGram SDK, edit history, avatar shapes, patpat 2026-11-16 21:02:59 +01:00
README.md Margy Gram 2.0: Material You, Discord mode, deleted messages, badges 2026-11-15 18:25:11 +01:00
README.ru.md Margy Gram 2.0: Material You, Discord mode, deleted messages, badges 2026-11-15 18:25:11 +01:00
README.zh.md Margy Gram 2.0: Material You, Discord mode, deleted messages, badges 2026-11-15 18:25:11 +01:00
version.json version.json: Margy Gram 2.0 from Margy Store 2026-11-16 21:04:47 +01:00

Margy

A Telegram fork for Android. Formerly Margelet, then Margy. Since 2.0 it is Margy Gram (MargyG): a new package, cat.narezany.margygram, and its own signature, so it installs next to the old one. Built from DrKLO/Telegram with the patch in this repository.

Русский · 中文

channel forum licence


Package cat.narezany.margygram. It installs next to the official Telegram, not over it. arm64 only.

Everything the fork adds lives in one place: Settings → Margy Gram, the first row.

What it adds

A message field that grows as far as you want

Stock Telegram stops the input box at six lines and starts scrolling. Here you pick: 2 to 15 lines, or max — grow while there is room on the screen. The text size inside the box is adjustable too.

The 4096-character limit per message stays. That one belongs to the server, not to the app, and no client can lift it.

The message field can move to the top of the chat

It moves under the chat header, and the room reserved for it in the message list moves up as well. The keyboard and the attachment panels stay at the bottom — they belong to the screen, not to the field.

Applies to the next chat you open: in an already open one half the sizes are counted from the old side.

Music tags: title, artist, cover

Long-press a track in a chat, then Track tags. In stock Telegram this is done through bots, which means handing your file to someone else's server for the sake of three lines of text. Here it happens on the phone: the tags are written into a copy of the file, and the copy is sent to the same chat.

The cover is picked with Telegram's own gallery and cropped with its own avatar-cropping screen.

Streamer mode

Your phone number is covered with dots everywhere the app shows it. Optionally the numbers of other people and your own username too.

There is no tap-to-reveal, on purpose: on stream an accidental touch of the screen is exactly the case the mode is turned on for. It opens only from the switch in settings.

IDs in profiles

A line with the numeric id appears in profiles of people, bots, groups and channels. Tap it to copy. Can be turned off.

Deleted gifts

Gifts Telegram took out of the catalog are added back to the end of the list, so they can be sent again. The purchase is still confirmed by the server: if a gift is really closed, sending it simply fails.

The trick and the list of gifts are by @binbash_0, author of the Deleted Gift Sender plugin. The code here is written from scratch, the idea is his.

A dark green theme out of the box

On first launch Margy turns on Telegram's own Night theme with its green accent. Once. Pick another one and the fork stays out of it.

Its own icon, in six colours

Green, night, lavender, sand, sea, rose — all of them in the app-icon picker, none of them behind Premium.

Text formatting of its own

Select a word and the menu gains "Size", "Dim" and "Rainbow" next to bold and italic. Size is bounded both ways: neither two pixels nor full screen.

Telegram's list of formatting types is closed and lives on the server, so nothing can be added to it. The formatting therefore travels inside the message text as invisible characters and is decoded by the fork itself. Without the fork you see plain text and a link line at the end of the message.

Each type can be turned off separately. Next to it, "Copy with formatting": a plain copy in Telegram gives bare text, this keeps bold, italics, links and our own formatting.

Donate

Its own row in the fork menu: the author's details, tap to copy.

There are no payment buttons inside the app and there will not be any — a messenger fork is a bad place to type payment details into. And donating unlocks nothing: there are no paid features here.

Badges

The person who made the fork, and their best friend, get a badge next to their name — in the profile, as its own block under the details, and in the chat list. Tapping it opens a window with the icon spinning in 3D: green and lavender respectively.

The Margy channel and forum carry one too. There it answers "is this really the right channel": the ids are compiled into the build.

The badge certifies nothing and asks no server: whoever builds their own fork puts their own people in. The window says so.

Seizure

Every piece of text in the app keeps changing colour. It is good for nothing.

It is not a flicker: the hue moves smoothly and the brightness stays put. Flashing between three and thirty times a second is what triggers photosensitive seizures, and that is not something to ship even on request. There is a warning before you turn it on anyway.

A cat

Somewhere. Want yours in the app? Write to @narezany.

Python plugins

Settings → Margy Gram → Plugins. A plugin is a .marp archive: a manifest, main.py, and anything else it needs. Install from a file, a list, a console with errors.

There is no sandbox. A plugin runs inside the app and can do anything the app can; the permissions in the manifest are the author's word, the app does not check them. The install dialog says exactly that. In exchange the forum rule applies: plugin code is not obfuscated, anyone must be able to read it.

Plugins are off entirely by default, and a new one is installed disabled. Documentation for authors: docs/plugins.md.

Badges are described in docs/badges.md: the list lives in badges.json and the app re-reads it on every start.

Releasing a new version: docs/release.md.

Building it yourself

You need SDK 36 with build-tools 36.0.0, NDK 27.2.12479018 and JDK 21.

git clone https://github.com/DrKLO/Telegram
cd Telegram
git checkout $(cat ../MargyGram/patch/UPSTREAM)
git submodule update --init --recursive
git apply ../MargyGram/patch/margelet.patch
# Telegram's prebuilt libprisma.a is older than its own code, rebuild it
(cd TMessagesProj/jni/prebuild && ABIS=arm64-v8a bash build_prisma.sh)
# your own api_id / api_hash from https://my.telegram.org go to local.properties:
#   MARGY_APP_ID=…
#   MARGY_APP_HASH=…
# your signing key too (MARGY_STORE_FILE, MARGY_STORE_PASSWORD,
# MARGY_KEY_ALIAS, MARGY_KEY_PASSWORD); without it Telegram's public key is used
gradle :TMessagesProj_AppStandalone:assembleAfatStandalone

The apk lands in TMessagesProj_AppStandalone/build/outputs/apk/afat/standalone/.

The patch contains the added files as well as the edits, so applying it is all you need. (It did not, once: git diff silently leaves out files git has never been told about, and the first published patch was missing every new class in it. That is why java/ and res/ are also kept here as plain copies, and why the patch is now generated after git add -N.)

What this repository does not contain

  • api_id / api_hash. The build owner's personal keys. Get your own at my.telegram.org. They are never committed here.
  • google-services.json. The one shipped in Telegram's sources describes Telegram's own Firebase project, which does not list our package. Until the fork has a project of its own the plugin stays disabled, which means push notifications do not arrive while the app is not running.

Files here

patch/margelet.patch every change to Telegram's sources, in one file
patch/UPSTREAM the Telegram commit the patch applies to
FEATURES.md every change, where it lives and why — the porting document
java/, res/ files the fork adds whole
python/ the layer between the app and its plugins
badges.json who has which badge — edited here, no rebuild needed
version.json the latest version and where its apk lives — this is what triggers the update bar
docs/ plugin and badge documentation, and an example plugin
tools/ scripts: draw the icon, install it, synthesise a sound
assets/ the logo, in svg and png
ATTRIBUTION.md the things in here that someone else made

FEATURES.md is the file to read before moving the fork to a newer Telegram. Telegram rewrites its screens often; the patch will stop applying. Each entry says what was done, where, and — the part that survives a rewrite — why.

Licence

Telegram's sources are GPL v2 or later, and the fork inherits that. If you hand someone the apk, you owe them the source it was built from: this repository plus the commit named in patch/UPSTREAM is exactly that.