@remit/mailbox-service 0.0.55 → 0.0.56
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/package.json
CHANGED
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Harvesting takes the display name straight off the envelope, and a sender
|
|
3
|
-
* chooses that string. A 2021 spam message reached this account's INBOX with
|
|
4
|
-
* `matthijs@ischen.nl <aramirez@secresaludguaviare.gov.co>`: the account's own
|
|
5
|
-
* address as the label on a stranger's. It was stored, autocomplete offered it
|
|
6
|
-
* back when the account holder typed his own address, and a private reply left
|
|
7
|
-
* the instance (issue #826).
|
|
8
|
-
*
|
|
9
|
-
* The name lands in three columns on this one save — the address book, the
|
|
10
|
-
* envelope the message header renders, and the sender label the message list
|
|
11
|
-
* shows and search indexes — so all three are asserted here.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
1
|
import assert from "node:assert/strict";
|
|
15
2
|
import { describe, it } from "node:test";
|
|
16
3
|
import type {
|
|
@@ -50,10 +37,6 @@ interface Saved {
|
|
|
50
37
|
threadMessages: CreateThreadMessageInput[];
|
|
51
38
|
}
|
|
52
39
|
|
|
53
|
-
/**
|
|
54
|
-
* Drive the real save path so the stored value is the one the write path
|
|
55
|
-
* produces, not one a test handed to a private method.
|
|
56
|
-
*/
|
|
57
40
|
const harvest = async (envelope: Partial<ImapEnvelope>): Promise<Saved> => {
|
|
58
41
|
const saved: Saved = {
|
|
59
42
|
addresses: [],
|
|
@@ -149,12 +132,6 @@ describe("harvesting an envelope display name", () => {
|
|
|
149
132
|
);
|
|
150
133
|
});
|
|
151
134
|
|
|
152
|
-
/**
|
|
153
|
-
* The incident with one word prepended. An anchored guard reads this as an
|
|
154
|
-
* ordinary name and stores it, and autocomplete then ties it with the real
|
|
155
|
-
* address on the term `matthijs` and breaks the tie on correspondence. The
|
|
156
|
-
* word itself is not the lie, so it survives the address being removed.
|
|
157
|
-
*/
|
|
158
135
|
it("keeps what a name says besides the address it claims", async () => {
|
|
159
136
|
const input = await onlyAddress({
|
|
160
137
|
from: [{ ...spoof, name: "Matthijs <matthijs@ischen.nl>" }],
|