MessagingModule · library/messaging/src/wechat-scan.ts:504

WechatScanFlow

component

WeChat's scan flow, contributed to messaging.scanFlows the way its connector is contributed to messaging.connectors. A completed poll is answered with the scanned bot's botId.

What it holds is the handle that collects a bot token rather than a key that decrypts a secret, and it is equally not worth persisting (see WeChatScanService).

API

@Component({
  contributes: {
    "MessagingModule.scanFlows": [
      {
        id: "messaging-wechat.scan-flow",
        channel: "wechat",
        accountIdField: "botId",
      },
    ],
  },
})
export class WechatScanFlow {
  @Use() private readonly wechatScanTransport!: WeChatScanTransportHandle;
  @Use() private readonly clock!: MessagingClock;
  @Bind("messaging-wechat.scan-flow") flow!: ScanFlow;
  setup();
}

Dependencies & Wiring

Extracted from class decorators
@Userequires (2)
wechatScanTransport: WeChatScanTransportHandle · clock: MessagingClock
@Bindbinds (1)
flow → messaging-wechat.scan-flow: ScanFlow

Contributes

{
  "MessagingModule.scanFlows": [
    {
      "id": "messaging-wechat.scan-flow",
      "channel": "wechat",
      "accountIdField": "botId"
    }
  ]
}

Target slots: MessagingModule.scanFlows

Methods (1)

setup

setup()