Forward the original source from restricted chats#309
Conversation
|
Too many broad changes. AyuForward already has chunking, so you should've just reused that, e.g. in Also, from what I've tested, it only works if the peer has already been resolved (e.g. opened manually at least once before app restart, or if you've already joined the source unrestricted channel). |
This comment was marked as off-topic.
This comment was marked as off-topic.
Resolve restricted forwards back to their original channel posts inside AyuForward's existing chunking flow. When a restricted forwarded message still points to an addressable original channel post, resolve that source item and plain-forward it. Fall back to full Ayu forward when the source is not a channel post, when the original channel is no longer accessible, when the source channel itself forbids forwarding, or when the original post can no longer be resolved. Remember source posts that were already confirmed missing in the current session so later forwarding decisions use the same fallback immediately. Make the full-Ayu checks in ApiWrap and ShareBox consider the whole selection so mixed batches still follow AyuForward's chunking rules.
Show the "Plain forwarding is not allowed" label only when an item actually requires a full Ayu fallback. Restricted chats can still plain-forward messages whose original source channel post is resolvable, so the menu should reflect the resolved forwarding mode instead of the chat-level no-forwards flag. Use isFullAyuForwardNeeded(item) for that label so source-rerouted messages stop showing the warning while full-Ayu-only messages still do.
e967d5c to
0f13166
Compare
|
@ZavaruKitsu I reworked it. Now the change stays focused in I fixed the bugs that you found and tested all the scenarios manually (see the list below). I also removed "Plain forwarding is not allowed" from messages which are likely to be forwarded directly. I did it in another commit. Since some of them may still fallback to Ayu forward technique, this fact is memorized and used next time if the same message is opened again in context menu. Ayu Forward Manual Test ChecklistUse a normal destination chat where you can verify whether the result was a plain forward or an Ayu-style fallback. When useful, repeat a case after app restart to check session-state behavior. Forwarding Behavior
Mixed Selections
Context Menu Label
Other Flows
I checked all of these manually. |
When forwarding from a chat with forwarding restrictions, prefer native forwarding from the forwardable original source message. This avoids Ayu re-upload where the source channel already allows forwarding, automating the manual open-original-and-forward workflow when possible.
What was done and how: