Skip to content

feat: add Email user module (toEmail / say / toFileBox index) - #126

Merged
hcfw007 merged 4 commits into
mainfrom
feat/email-im
Jul 29, 2026
Merged

feat: add Email user module (toEmail / say / toFileBox index)#126
hcfw007 merged 4 commits into
mainfrom
feat/email-im

Conversation

@hcfw007

@hcfw007 hcfw007 commented Jul 29, 2026

Copy link
Copy Markdown
Member

Summary

  • New Email user module (Impl/Interface factory mirroring UrlLink) with full payload getters, mounted on Wechaty.Email
  • Message.toEmail() accessor; Message.toFileBox(index?) fetches the N-th email attachment
  • say(email) dispatch to puppet.messageSendEmail and full sayable round-trip (deliver / message-to-sayable / sayable-to-payload / payload-to-sayable / types)
  • Runnable email.spec.ts (15 assertions)

Depends on juzibot/wechaty-puppet#113.

Test plan

  • npm run dist / lint green; email.spec + wechaty-impl.spec pass under repo tap config
  • 4 SIGABRT spec failures verified pre-existing on main (node v24 async-error crash), unrelated

🤖 Generated with Claude Code

hcfw007 added 4 commits July 30, 2026 00:41
… index)

Mirror the UrlLink user-module pattern for the new Email message type
(MessageType.Email=28), wrapping PUPPET.payloads.Email.

- src/user-modules/email.ts: EmailImpl/Interface/Constructor factory with
  getters for every payload field (subject/from/to/cc/bcc/date/mimeMessageId/
  inReplyTo/references/replyTo/sender/headers/text/html/attachments)
- message.ts: toEmail() accessor; toFileBox(index?) forwards the optional
  attachment index to puppet.messageFile
- say() dispatch: EmailImpl -> puppet.messageSendEmail in deliver-sayable;
  full sayable round-trip (message-to-sayable / sayable-to-payload /
  payload-to-sayable / Sayable union)
- aggregate registration mirrored across mod.ts, wechatify user-module mixin
  (Wechaty.Email mount), mods/impls.ts, mods/users.ts, wechaty-impl.spec.ts
- email.spec.ts: payload construction + getter exposure + valid()
@hcfw007
hcfw007 merged commit 2c31127 into main Jul 29, 2026
11 checks passed
@hcfw007
hcfw007 deleted the feat/email-im branch July 29, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant