pi-session-mail 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,15 @@ follows [Semantic Versioning](https://semver.org/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.2.1] - 2026-10-02
10
+
11
+ ### Fixed
12
+
13
+ - `/mailbox` refuses with `mailbox: this session has no mailbox address; the
14
+ mailbox is off` when this session's mailbox is off (an unusable session id,
15
+ or a mail root it cannot create). Before, it showed the session id as the
16
+ address, failed a send with a raw error, and still pruned.
17
+
9
18
  ## [0.2.0] - 2026-10-02
10
19
 
11
20
  ### Added
@@ -102,6 +111,7 @@ author's dotfiles; the changes below are against that copy.
102
111
  - CI on Node 22.19 and 24: lint, typecheck, tests, and a check of the
103
112
  published file list.
104
113
 
105
- [Unreleased]: https://github.com/gvanderclay/pi-session-mail/compare/v0.2.0...HEAD
114
+ [Unreleased]: https://github.com/gvanderclay/pi-session-mail/compare/v0.2.1...HEAD
115
+ [0.2.1]: https://github.com/gvanderclay/pi-session-mail/compare/v0.2.0...v0.2.1
106
116
  [0.2.0]: https://github.com/gvanderclay/pi-session-mail/compare/v0.1.0...v0.2.0
107
117
  [0.1.0]: https://github.com/gvanderclay/pi-session-mail/releases/tag/v0.1.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-session-mail",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "A file mailbox between Pi sessions on the same machine",
5
5
  "keywords": [
6
6
  "pi-package",
package/src/index.ts CHANGED
@@ -610,7 +610,11 @@ export default function mailbox(pi: ExtensionAPI) {
610
610
  description:
611
611
  "Show this session's mailbox address and name, send a request: /mailbox <name or id> <text>, or remove closed sessions' empty mailbox folders: /mailbox prune",
612
612
  handler: async (args, context) => {
613
- const me = context.sessionManager.getSessionId();
613
+ const me = address;
614
+ if (me === undefined) {
615
+ context.ui.notify("mailbox: this session has no mailbox address; the mailbox is off", "error");
616
+ return;
617
+ }
614
618
  const trimmed = args.trim();
615
619
  if (trimmed === "") {
616
620
  const current = context.sessionManager.getSessionName?.() || undefined;