Commit graph

383 commits

Author SHA1 Message Date
b52d3f3f64 Merge pull request 'welcome message: point updates-channel mention at @ziodotsh' (#4) from welcome-mention-ziodotsh into main
Reviewed-on: #4
2026-09-09 14:49:49 +02:00
69d64f3d80 welcome message: point updates-channel mention at @ziodotsh
Rename the official updates channel mention from @zio to @ziodotsh in the
welcome message template and update the affected send-message test.
2026-09-09 13:49:07 +01:00
63c565e490 Merge pull request 'channels: drop stale membership caches on join/leave' (#3) from fix/stale-membership-after-leave into main
Reviewed-on: #3
2026-09-09 14:34:04 +02:00
2419f47236 channels: drop stale membership caches on join/leave
After channels.leaveChannel, a client that polls channels.getFullChannel kept
receiving a projection that still showed it as an active member (left=false)
until the per-(viewer,channel) RPC projection cache and the store-level member
cache lapsed on their own or the async read-model NOTIFY landed. The client
therefore kept an open compose box while every send was already rejected with
CHANNEL_PRIVATE - most visible on public forum supergroups, where getFullChannel
keeps succeeding via the preview path instead of tearing the chat down.

Every other membership-mutating path already busts these caches synchronously;
join/leave/invite/request-approval did not. Add:

- store: invalidateChannelMembershipCaches (row + member + dialog caches),
  called post-commit from JoinChannel, LeaveChannel, ImportInvite,
  InviteToChannel.
- rpc: invalidateChannelMembershipProjection (channelFullProjectionCache pair),
  called from the join/leave/invite/hide-requests handlers for every user whose
  membership changed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-09 13:28:50 +01:00
d55a97f0a5 Merge pull request 'channels: force pre-history visible when a group gets a public username' (#2) from fix/prehistory-visible-on-publish into main
Reviewed-on: #2
2026-09-09 13:52:52 +02:00
df15c3ffb3 channels: force pre-history visible when a group gets a public username
New supergroups are created with "chat history for new members" hidden (the
client sets this right after creation, matching official Telegram). The
official server then forces it back to visible when the group is made public;
owpengram's UpdateUsername left the flag alone, leaving public groups in a
state where non-members (and post-join members) see no history at all.

UpdateUsername now clears pre_history_hidden whenever a non-empty username is
assigned, in the same transaction, with a matching admin-log event. Removing
the username leaves the flag untouched, so the creator can hide history again
once the group is private.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-09 12:51:23 +01:00
c376262cff Merge pull request 'channels: give getParticipants a stable Hash when read-model versions are missing' (#1) from fix/channel-participants-fallback-hash into main
Reviewed-on: astra/owpengram#1
2026-09-09 13:27:20 +02:00
5f63240f2d channels: give getParticipants a stable Hash when read-model versions are missing
cachedParticipants returned a participant page with Hash=0 whenever the
channel_base / channel_participants rows in read_model_versions were never
seeded for a channel (e.g. groups created via messages.createChat). With
Hash=0 the RPC layer can never answer channels.channelParticipantsNotModified,
so a client that polls the member list re-fetches it in a tight loop forever.

Fall back to a deterministic content hash derived from the page itself
(channel id, page key, count, and each member's id/role/status/rank) so an
unchanged member list yields an identical non-zero Hash and the client
converges. The read-model-backed path is unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-09 12:26:30 +01:00
41f65bf0fc forum: fix reply_to_top_id for replies inside a forum
resolveChannelReply applied discussion-thread logic (reply_to_top_id =
the replied-to message's own id) to forum replies. Replying to a General
message produced reply_to_top_id = <that id>, a topic no client can
resolve: the reply vanished from every topic view and reply-jump on
strict clients said "message doesn't exist".

Forum replies now inherit the target's topic via domain.ForumReplyTopicID
(target's topic, or its own id if it's a topic-create, else General), and
General (topic 1) is accepted as a valid virtual topic everywhere, so
sends carrying top_msg_id: 1 are no longer rejected. Non-forum discussion
threads are unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-09 11:15:56 +01:00
443ca300b9 forum: let non-members browse a public forum's topic list
ListForumTopics / GetForumTopicsByID / GeneralForumTopic gated on
membership while channel history uses the public-preview path, so a
public forum's topics (General included) were invisible until you joined.
Switch them to getChannelForViewer / channelForViewerLocked; private
forums and write paths keep the membership gate.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-09 11:15:56 +01:00
f26468ef6d media: never project zero image/video dimensions (crashes Telegram Desktop on reactions) 2026-09-08 16:29:37 +01:00
233a2399e9 welcome message: link @zio with a mention entity 2026-09-08 16:29:37 +01:00
f8aefb7fd5 payments: stub getStarGifts / getSavedStarGifts to stop tdesktop 500 retry storm 2026-09-08 16:29:37 +01:00
b3281d66d7 Containerfile: copy sticker-seed data into the image 2026-09-08 13:55:30 +01:00
8bc54fbfc5 /mybots: Edit Bot summary screen, return-to-menu, clickable @mentions
- Edit Bot now shows the current value of every field (Name/About/
  Description/Botpic/Commands) like BotFather, with real botpic status
  via a new PeerHasAvatar port method.
- After editing a field the dialog lands back on a fresh Edit Bot menu
  (working "Back to bot" / "Bots list" buttons) instead of ending, so a
  follow-up button press no longer reports the button as expired.
- Service-bot messages now render @username as a tappable mention entity.
2026-09-08 13:44:01 +01:00
165f81414c Add @zio channel invite to the sign-in welcome message 2026-09-08 13:31:39 +01:00
11142f74c5 Interactive /mybots menu for @BotFather
Button-driven bot management: paginated picker, per-bot API token /
revoke, Edit Bot (name/description/about/commands/botpic), Bot Settings
toggles (inline/groups/privacy), and delete. Navigation edits the menu
message in place via a new editServiceBotMessage helper.

Edit Botpic accepts a photo the user sends to @BotFather and sets it as
the bot's profile photo (new files.SetAvatarFromExistingPhoto, wired
through bots.SetBotUserpic / WithBotAvatarStore); photos.uploadProfilePhoto
does not accept a bot target so this is the only route.
2026-09-08 13:31:05 +01:00
1ebf8ddb5a Add Containerfile and .containerignore 2026-09-08 13:23:50 +01:00
80e99e8781 Don't 500 on channel sends with an unresolvable @mention
A channel post containing an @token that is not a syntactically valid
username (too short, leading digit, etc.) made messages.sendMessage return
500 INTERNAL_SERVER_ERROR: mentionedUserIDsFromMessage turned every
ResolveUsername error into internalErr().

Skip tokens that fail with ErrUsernameInvalid / ErrUsernameNotOccupied
instead, matching real Telegram (the message sends, the client renders the
mention and only fails to open it on tap). Only unexpected storage errors
still abort. Same fix applied to the bot send path.
2026-09-08 11:42:03 +01:00
onysd
2cfc7a0539 quickfix 2026-08-25 00:51:43 +03:00
onysd
ddaef7454a updated readme 2026-08-25 00:35:42 +03:00
onysd
e6a777983c fix 2026-08-25 00:20:05 +03:00
onysd
fe1cf1184f fix 2026-08-25 00:01:59 +03:00
onysd
ed2e61d32a fix 2026-08-24 23:41:58 +03:00
onysd
a8ff844139 fix 2026-08-24 23:36:01 +03:00
onysd
58a0aed4f3 fix for gifs auto-catigorisation 2026-08-24 23:26:57 +03:00
onysd
0321c196bd restored logic fix 2026-08-24 23:19:35 +03:00
onysd
f47a6584aa fix 2026-08-24 23:17:55 +03:00
onysd
5d328e2ddf fix 2026-08-24 23:16:42 +03:00
onysd
edc5f84b6d fix 2026-08-24 23:14:50 +03:00
onysd
d0669bdc5e categorisation for gifs 2026-08-24 23:09:08 +03:00
onysd
5e18bd3830 fix for gif and emojies categories 2026-08-24 22:42:40 +03:00
onysd
cf23b184d2 fix 2026-08-07 13:50:38 +03:00
onysd
78f174018e fix 2026-08-07 11:30:12 +03:00
onysd
bd0f2a73f0 fixed server-panel 2026-08-07 11:13:17 +03:00
onysd
4ac94f00de added gifs scan at start 2026-08-07 11:02:05 +03:00
onysd
15f2d6e925 added gifs preview 2026-08-07 10:51:43 +03:00
onysd
ff1d5ae361 fix 2026-08-07 10:13:42 +03:00
onysd
354128c106 added full gifts support 2026-08-07 10:13:11 +03:00
onysd
ea5b86de8f fix 2026-08-07 06:13:10 +03:00
onysd
cf5a03ca89 fix 2026-08-07 04:30:25 +03:00
onysd
d16f34070d fix for overview panel 2026-08-07 04:26:56 +03:00
onysd
21d8e91756 removed all "paid" features - no more stars, gifts, or grams 2026-08-07 01:50:10 +03:00
onysd
d4451d753c changed readme 2026-08-06 22:52:09 +03:00
onysd
818c9a58a3 disabling marksbot when third-party verifications if turned off 2026-08-06 15:45:32 +03:00
onysd
2491088e81 added ability to broadcast 2026-08-06 15:22:36 +03:00
onysd
7d41cbeb1e updated NFT usernames menu 2026-08-06 14:41:53 +03:00
onysd
36350f83dc added ability to disable third-party verification 2026-08-06 05:27:48 +03:00
onysd
4f0fa895c1 added avatar for verification bot 2026-08-06 04:39:28 +03:00
onysd
a9586aec87 fix 2026-08-06 03:28:49 +03:00