feat: 实现端停用与删除的消息作废与群主转让级联
This commit is contained in:
@@ -32,8 +32,10 @@ type Config struct {
|
||||
Sessions auth.SessionTokens
|
||||
// MaxScheduleSeconds 限制 self.update 的 default_delay_ms。
|
||||
MaxScheduleSeconds int64
|
||||
// ConnControl 可选:logout 后踢线;未接线时为 nil。
|
||||
// ConnControl 可选:logout / 停用 / 删除后踢线;未接线时为 nil。
|
||||
ConnControl port.ConnControl
|
||||
// Downlink 可选:停用/删除时发 revoked 与群事件;未接线时为 nil。
|
||||
Downlink port.Downlink
|
||||
}
|
||||
|
||||
// App 实现 identity.Service(含 I1 注册与 I2 self/对话密码)。
|
||||
@@ -45,6 +47,7 @@ type App struct {
|
||||
sessions auth.SessionTokens
|
||||
maxScheduleSeconds int64
|
||||
connCtrl port.ConnControl
|
||||
down port.Downlink
|
||||
nowFn func() time.Time
|
||||
}
|
||||
|
||||
@@ -81,6 +84,7 @@ func New(cfg Config) *App {
|
||||
sessions: cfg.Sessions,
|
||||
maxScheduleSeconds: cfg.MaxScheduleSeconds,
|
||||
connCtrl: cfg.ConnControl,
|
||||
down: cfg.Downlink,
|
||||
nowFn: cfg.Now,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user