fix: sync WebK compatibility paths

This commit is contained in:
A 2026-07-15 16:07:43 +08:00
parent 766c5db992
commit 76bfc5100f
12 changed files with 387 additions and 8 deletions

View file

@ -0,0 +1,25 @@
package rpc
import (
"context"
"github.com/iamxvbaba/td/tg"
)
// onMessagesReceivedMessages acknowledges the client's highest observed
// message id. telesrv does not enqueue mobile PUSH notifications, so there are
// no pending notifications to cancel and the exact cancellation set is empty.
// This acknowledgement must never advance read boundaries or update state.
func (r *Router) onMessagesReceivedMessages(ctx context.Context, _ int) ([]tg.ReceivedNotifyMessage, error) {
userID, authorized, err := r.currentUserID(ctx)
if err != nil {
return nil, internalErr()
}
if !authorized || userID == 0 {
return nil, authKeyUnregisteredErr()
}
if r.userIsBot(ctx, userID) {
return nil, botMethodInvalidErr()
}
return []tg.ReceivedNotifyMessage{}, nil
}