mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 15:44:01 +03:00
Propagate adtag
This commit is contained in:
+4
-1
@@ -19,6 +19,8 @@ import (
|
||||
|
||||
type middleTelegram struct {
|
||||
middleTelegramCaller
|
||||
|
||||
adtag []byte
|
||||
}
|
||||
|
||||
func NewMiddleTelegram(conf *config.Config, logger *zap.SugaredLogger) Telegram {
|
||||
@@ -36,6 +38,7 @@ func NewMiddleTelegram(conf *config.Config, logger *zap.SugaredLogger) Telegram
|
||||
},
|
||||
dialerMutex: &sync.RWMutex{},
|
||||
},
|
||||
adtag: conf.AdTag,
|
||||
}
|
||||
|
||||
if err := tg.update(); err != nil {
|
||||
@@ -70,7 +73,7 @@ func (t *middleTelegram) Init(connOpts *mtproto.ConnectionOpts, conn wrappers.Re
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return nil, nil
|
||||
return mtwrappers.NewProxyRequestRWC(secureConn, connOpts, t.adtag)
|
||||
}
|
||||
|
||||
func (t *middleTelegram) sendRPCNonceRequest(conn io.Writer) (*rpc.RPCNonceRequest, error) {
|
||||
|
||||
Reference in New Issue
Block a user