diff --git a/src/schemas/room-events.ts b/src/schemas/room-events.ts index 0f443f815..ebf1ea283 100644 --- a/src/schemas/room-events.ts +++ b/src/schemas/room-events.ts @@ -103,7 +103,7 @@ type RoomEventListenerJoin = (this: RoomInterface, inviteeList: ContactInterf type RoomEventListenerLeave = (this: RoomInterface, leaverList: ContactInterface[], remover?: ContactInterface, date?: Date) => void | Promise type RoomEventListenerMessage = (this: RoomInterface, message: MessageInterface, date?: Date) => void | Promise type RoomEventListenerTopic = (this: RoomInterface, topic: string, oldTopic: string, changer: ContactInterface, date?: Date) => void | Promise -type RoomEventListenerAnnounce= (this: RoomInterface, announce: string, changer: ContactInterface, oldAnnounce?: string, date?: Date) => void | Promise +type RoomEventListenerAnnounce= (this: RoomInterface, announce: string, changer?: ContactInterface, oldAnnounce?: string, date?: Date) => void | Promise type RoomEventListenerOwner = (this: RoomInterface, newOwner: ContactInterface, oldOwner: ContactInterface) => void | Promise interface RoomEventListeners { diff --git a/src/schemas/wechaty-events.ts b/src/schemas/wechaty-events.ts index ebe9426a3..4ed7dc2f0 100644 --- a/src/schemas/wechaty-events.ts +++ b/src/schemas/wechaty-events.ts @@ -54,7 +54,7 @@ type WechatyEventListenerRoomInvite = (roomInvitation: RoomInvitationInt type WechatyEventListenerRoomJoin = (room: RoomInterface, inviteeList: ContactInterface[], inviter: ContactInterface, date?: Date) => void | Promise type WechatyEventListenerRoomLeave = (room: RoomInterface, leaverList: ContactInterface[], remover?: ContactInterface, date?: Date) => void | Promise type WechatyEventListenerRoomTopic = (room: RoomInterface, newTopic: string, oldTopic: string, changer: ContactInterface, date?: Date) => void | Promise -type WechatyEventListenerRoomAnnounce = (room: RoomInterface, newAnnounce: string, changer: ContactInterface, oldAnnounce?: string, date?: Date) => void | Promise +type WechatyEventListenerRoomAnnounce = (room: RoomInterface, newAnnounce: string, changer?: ContactInterface, oldAnnounce?: string, date?: Date) => void | Promise type WechatyEventListenerRoomOwner = (room: RoomInterface, newOwner: ContactInterface, oldOwner: ContactInterface) => void | Promise type WechatyEventListenerScan = (qrcode: string, status: PUPPET.types.ScanStatus, data: string, type: PUPPET.types.ScanType, createDate: Date, expireDate?: Date) => void | Promise type WechatyEventListenerStartStop = () => void | Promise diff --git a/src/wechaty-mixins/puppet-mixin.ts b/src/wechaty-mixins/puppet-mixin.ts index dcbaabc11..ed0a8f320 100644 --- a/src/wechaty-mixins/puppet-mixin.ts +++ b/src/wechaty-mixins/puppet-mixin.ts @@ -526,9 +526,13 @@ const puppetMixin =