karin0 · GitHub

Steps to Reproduce

import logging
import os
from telegram import Update
from telegram.ext import ApplicationBuilder, ContextTypes, MessageHandler
logging.basicConfig(level=logging.DEBUG)
async def handle(update: Update, context: ContextTypes.DEFAULT_TYPE):
    if post := update.channel_post:
        print(f'channel_post.from_user   = {post.from_user!r}')
        print(f'channel_post.sender_chat = {post.sender_chat!r}')
        print(f'update.effective_user    = {update.effective_user!r}')
        print(f'update.effective_sender  = {update.effective_sender!r}')
app = ApplicationBuilder().token(os.environ['BOT_TOKEN']).build()
app.add_handler(MessageHandler(None, handle))
app.run_polling()
  1. Run and add this bot to a channel
  2. Turn on "Sign messages" in the channel settings
  3. Send a message "as personal account" in the channel

Expected behaviour

update.effective_user and update.effective_sender should be the user:

<...>
DEBUG:telegram.ext.Application:Processing update Update(channel_post=Message(author_signature=<...>, from_user=User(first_name=<...>), <...>), update_id=<...>))
channel_post.from_user   = User(first_name=<...>)
channel_post.sender_chat = None
update.effective_user    = User(first_name=<...>)
update.effective_sender  = User(first_name=<...>)

Actual behaviour

update.effective_user and update.effective_sender are None:

<...>
DEBUG:telegram.ext.Application:Processing update Update(channel_post=Message(author_signature=<...>, from_user=User(first_name=<...>), <...>), update_id=<...>))
channel_post.from_user   = User(first_name=<...>)
channel_post.sender_chat = None
update.effective_user    = None
update.effective_sender  = None

Operating System

Arch Linux

Version of Python, python-telegram-bot & dependencies

python-telegram-bot 22.7
Bot API 9.6
Python 3.14.5 (main, May 10 2026, 19:28:16) [Clang 22.1.3 ]

Relevant log output

Additional Context

I have verified this still exists on the master branch, and I am glad to send a pull request to fix this if appropriate.

Read the original on github.com ↗