Compare commits
534 Commits
letterbox-
...
letterbox-
| Author | SHA1 | Date | |
|---|---|---|---|
| 1aa6f22461 | |||
| 2f5026c75b | |||
| dcb90ca2c8 | |||
| 772548f10d | |||
| c62e925016 | |||
| 4570a6ea1c | |||
| ae06df21a0 | |||
| 02d43feb79 | |||
| 0e6508498a | |||
| a94bd8a341 | |||
| 788baf9e86 | |||
| fdf910b1a1 | |||
| 714c94e40b | |||
| 667893b6a3 | |||
| 687b050410 | |||
| 48bad8cbb0 | |||
| d156fe8282 | |||
| fc66759e92 | |||
| fcdc2d56a9 | |||
| 60993abd6f | |||
| c1112e5538 | |||
| 1b59c7a287 | |||
| 17cdae7bfb | |||
| f89135fce5 | |||
| 38c1d140bd | |||
| 197ea049b2 | |||
| f843166147 | |||
| 943dd5c142 | |||
| a1cf16350b | |||
| 626eca5619 | |||
| cb77f83607 | |||
| b2f1431664 | |||
| c541f4bd00 | |||
| 4a20b1d4ba | |||
| d54c90dc7b | |||
| f8a4a5d5b4 | |||
| 8c99bb3ba1 | |||
| c1a66fc548 | |||
| f45bf002ba | |||
| 630e9b68b7 | |||
| 787e10a989 | |||
| 7de6a5f0fc | |||
| 83230ba962 | |||
| 6ef786c4e7 | |||
| d4c29d7b98 | |||
| 95a4f2e630 | |||
| faa35dd65a | |||
| 7c54c6b9c3 | |||
| 2d1e38bdff | |||
| 33bb355975 | |||
| 2f20a3a8ed | |||
| 8b3bfe253f | |||
| 22b9646ac4 | |||
| 1df8ad8a0c | |||
| bb7721dbc6 | |||
| 475c552e3a | |||
| c85832c93b | |||
| 7e991186fe | |||
| 95d06ec669 | |||
| 84810d8644 | |||
| 8a86f0d0b2 | |||
| eab4986fd3 | |||
| 3c644c570e | |||
| 7a9df3c15c | |||
| f9d8acf744 | |||
| 75f3770f3e | |||
| 85dd61a272 | |||
| 1c5412de14 | |||
| 034027ddd5 | |||
| 81a07a8172 | |||
| d9e8c2133e | |||
| 99aa7a7071 | |||
| bf7418339e | |||
| cc585cc63f | |||
| 293f90fde5 | |||
| a06e4b3454 | |||
| 6e5145e21b | |||
| d41f3e9fd1 | |||
| 5519018043 | |||
| e3121219b6 | |||
| 7272bbb6b0 | |||
| dc741f421b | |||
| 69d3b8a210 | |||
| f5c4067291 | |||
| 930a45cbad | |||
| ef612c0d4f | |||
| 723e9c5ff5 | |||
| 0fdcfabfbe | |||
| b6c3f014cb | |||
| 1937bb4c99 | |||
| cdd5d9befc | |||
| 232a14fd96 | |||
| 3038c98a7a | |||
| 4dd240c358 | |||
| c66e876ab7 | |||
| a7762595fa | |||
| 1ac471dfe7 | |||
| 72a549ea0f | |||
| 878afd695f | |||
| 50b23731df | |||
| 95df6b54ea | |||
| ee626eb631 | |||
| 26f805738d | |||
| 30b89c2418 | |||
| b933b2a113 | |||
| dfbe6d67aa | |||
| 8cca562a33 | |||
| b1e207765f | |||
| b140c15fc8 | |||
| 859564c476 | |||
| 3c48076996 | |||
| 01fd53e467 | |||
| 8001c37c91 | |||
| f139dd391a | |||
| 27588b44c3 | |||
| 79c78615f5 | |||
| 3971228fc3 | |||
| 5dbce7642e | |||
| f0d14f6bdc | |||
| 18e8802299 | |||
| 51ff0b8e14 | |||
| 8ea3ac2745 | |||
| a4c9850d8e | |||
| 9e7522951c | |||
| b43a025d1a | |||
| 2aa82f09c6 | |||
| 27f800356c | |||
| 20ddf25605 | |||
| c79ffee6e4 | |||
| 1972e9ec20 | |||
| 2a238b0b02 | |||
| 639b6c9f0a | |||
| 2d6bf544da | |||
| a56b6d72f6 | |||
| c03de14b79 | |||
| 44fc422aa3 | |||
| 58880c17aa | |||
| 2be3b9ed07 | |||
| 9dfaa11cc6 | |||
| 49492f9f21 | |||
| 84e120df95 | |||
| b21f0bc398 | |||
| d8463c3178 | |||
| e1681edda3 | |||
| 25ee8522ad | |||
| df356e8711 | |||
| 2e43700cd7 | |||
| b3769d99bf | |||
| 2aa85a03f8 | |||
| c0982e82c6 | |||
| 8971fe3b6b | |||
| 243e35ec15 | |||
| 4cf1f882b8 | |||
| a8129e4685 | |||
| 50a4bfcac7 | |||
| 90ac9a1e43 | |||
| 52b19365d7 | |||
| 399865f5f7 | |||
| 2eb4784e83 | |||
| be2085b397 | |||
| 2837ea835a | |||
| a84e673d88 | |||
| 2bc840a4e2 | |||
| dd2062f719 | |||
| 616623e477 | |||
| 593a20f621 | |||
| 584ccba5bd | |||
| e7a01e9d70 | |||
| 727599c12c | |||
| 17ad5b3b0b | |||
| 285b2f1591 | |||
| 1537333e76 | |||
| 285ff1d098 | |||
| 1563bf05a3 | |||
| 458aab3167 | |||
| 492e420337 | |||
| aa6f99f32e | |||
| 330f9b1763 | |||
| ad904ac1c0 | |||
| 20f125bda5 | |||
| cf99e75ab8 | |||
| 54fc1e7962 | |||
| b187edc23b | |||
| fdafba3eeb | |||
| c5fe9f67d2 | |||
| ff970acf79 | |||
| 2f9bc17873 | |||
| 7e82f4ce97 | |||
| 5bb4f010d3 | |||
| 0af630acbe | |||
| d3d350e159 | |||
| 4013e4a7bf | |||
| b63171ea98 | |||
| 1c6ef02d11 | |||
| 32e5837dbf | |||
| 38234d4d18 | |||
| f609a3c122 | |||
| 440a630414 | |||
| ebda258750 | |||
| f766b3d529 | |||
| 96d927d416 | |||
| 60543b7e5d | |||
| 97a7bb6083 | |||
| c493857188 | |||
| 21f344b01c | |||
| 78f6d87c03 | |||
| 6edad4e8f2 | |||
| 8b06950cb8 | |||
| 34417131b0 | |||
| d63e72ad35 | |||
| 33c0a106b7 | |||
| 030d1c2ebe | |||
| e386d7e74e | |||
| 55e38e96a0 | |||
| 7f47fe8de6 | |||
| 3889b855a5 | |||
| 2c1c7abf0a | |||
| 9452a2b014 | |||
| 16e559c1c2 | |||
| 93736b386f | |||
| a632e6e6bc | |||
| 1c0f6d7ed4 | |||
| 51b0b719d3 | |||
| 2c6fee0fba | |||
| d33e9b87b2 | |||
| 02d5c7372c | |||
| d51bcd81ed | |||
| 4d9dc31f3b | |||
| fba91293d9 | |||
| e1be683d73 | |||
| c94b9f088a | |||
| 663298d650 | |||
| 23e4d3b968 | |||
| 0df97a7b76 | |||
| f82fc5dc77 | |||
| 2830c238fd | |||
| 6cebb0e7d5 | |||
| 1837b5ef01 | |||
| 48bf8ba81f | |||
| 645d008278 | |||
| 0b94f482c7 | |||
| 067b480856 | |||
| 89cb1e4e75 | |||
| 46021c5d2c | |||
| 4243f7b77d | |||
| 06e65a52b3 | |||
| f3c5b4eb8c | |||
| 184ac3011d | |||
| fba27ab7c4 | |||
| 4526d99de9 | |||
| 6ff9b2cd54 | |||
| 3311f2fc00 | |||
| 3fd41062d7 | |||
| 2f0a3f50b8 | |||
| caf924203e | |||
| 7b7f012b19 | |||
| 710e440fbf | |||
| af48dff922 | |||
| cbe7dbed96 | |||
| 6b011e0ffa | |||
| ab1862db2d | |||
| 0afa6da3f2 | |||
| f85649dadd | |||
| 0140fa5efe | |||
| 832b322b77 | |||
| 66dbcf2cfd | |||
| 54dc45660a | |||
| 3827f87111 | |||
| 25839328ac | |||
| b2c20cc010 | |||
| 7f1f61dc7d | |||
| 6ca2459034 | |||
| ea60cce86b | |||
| b4113cb59a | |||
| f0493d165d | |||
| 43d856ae7e | |||
| 5b48c5dbc3 | |||
| d16c221995 | |||
| 00ce9267c1 | |||
| 8acf541d53 | |||
| 49e93829dd | |||
| a8a5089ed3 | |||
| cc994df4e5 | |||
| d143b2715d | |||
| c2428c073c | |||
| 574de65c35 | |||
| 834e873862 | |||
| 6c07b18eec | |||
| b191bcbddf | |||
| a1be436209 | |||
| 5b471b278c | |||
| 34bda32e30 | |||
| 501ee417c9 | |||
| ecc0a88341 | |||
| d36d508df0 | |||
| b9b12dd717 | |||
| 633e055472 | |||
| 951ee70279 | |||
| 3a41ab1767 | |||
| 5c9955a89e | |||
| 1f75627fd2 | |||
| 5c42d04598 | |||
| 4d888fbea3 | |||
| 8f53678e53 | |||
| 8218fca2ef | |||
| 01164d6afa | |||
| 2f06ae93ae | |||
| 75d4fe49e2 | |||
| 9f2016940b | |||
| ba9cc0127b | |||
| ce17c4a7d8 | |||
| c8850404b8 | |||
| 638e94b4ae | |||
| d0f4716d83 | |||
| 59e35062e7 | |||
| 43827b4d87 | |||
| b29e92cd9c | |||
| 42bea43de9 | |||
| 4048edde11 | |||
| 90768d0d1b | |||
| 70e6271ca3 | |||
| 0bda21e5e9 | |||
| f987b4e4b4 | |||
| a873ec9208 | |||
| d8d26e1f59 | |||
| 1322dde5c5 | |||
| a2147081e8 | |||
| 8c6a24e400 | |||
| 8a08d97930 | |||
| d24a851cd7 | |||
| f6ff597f66 | |||
| 387d133f09 | |||
| a9674e8b7b | |||
| 457f9ac1c2 | |||
| d62759565f | |||
| 4fd97700f7 | |||
| 99b9a88663 | |||
| 56e6036892 | |||
| 232e436378 | |||
| e2bf4d890f | |||
| e9584785a8 | |||
| 7a4d2abdd5 | |||
| b764d725b1 | |||
| 7bac98762c | |||
| 2bedd92e1a | |||
| da72c09fa3 | |||
| 38c1942ebb | |||
| 05a7386dd1 | |||
| 477ffe8d82 | |||
| 5d80f32b49 | |||
| ae76bdf9a5 | |||
| 50e3c77e49 | |||
| e85a505775 | |||
| 86ea5a13f3 | |||
| a30bff925f | |||
| 6fdfbb1ee2 | |||
| 561316ddd4 | |||
| 495e495888 | |||
| ddb4c812ce | |||
| 1aaf914ac5 | |||
| 982b5dae2f | |||
| 8807c1b1f5 | |||
| fa23658ef0 | |||
| f175faed98 | |||
| 8971c16117 | |||
| fbecf564b5 | |||
| e5643c6fd0 | |||
| a8734269f7 | |||
| cab4e571f3 | |||
| 4d6c6af7d9 | |||
| cf08831ed1 | |||
| e1509c5978 | |||
| 13db8e6f1f | |||
| 136a837fa4 | |||
| 1ea058c664 | |||
| f4c11c5b3f | |||
| 8dc8f3a0f8 | |||
| 7b9450b65b | |||
| b5de0719dd | |||
| 58da28a19b | |||
| 75ad27ec2f | |||
| f904fa0001 | |||
| b94596bf65 | |||
| aa24599921 | |||
| c81a8c1cd3 | |||
| 7c3cfec3d1 | |||
| a2920fde3b | |||
| 8bc449ae6e | |||
| 0febd0535a | |||
| a9e00a54e4 | |||
| 6811c689ff | |||
| 8ba6b3d0b0 | |||
| a7c5585e80 | |||
| 4ef4d49113 | |||
| f8af303110 | |||
| fa5aac34ba | |||
| b58556254e | |||
| e365ced7dd | |||
| 93d569fb14 | |||
| f86a5f464d | |||
| 956c20b156 | |||
| 1eb498712b | |||
| f12979c0be | |||
| 4665f34e54 | |||
| bbdc35061c | |||
| f11f0b4d23 | |||
| c7c47e4a73 | |||
| c3835522b2 | |||
| dfa80f9046 | |||
| b8dfdabf8d | |||
| bbcf52b006 | |||
| f92c05cd28 | |||
| 885bbe0a8c | |||
| 8b1d111837 | |||
| 08abf31fa9 | |||
| fa99959508 | |||
| 0f6af0f475 | |||
| 4c486e9168 | |||
| 109d380ea7 | |||
| 4244fa0d82 | |||
| 4b15e71893 | |||
| 1bbebad01b | |||
| 27edffd090 | |||
| 08212a9f78 | |||
| 877ec6c4b0 | |||
| 3ce92d6bdf | |||
| 1a28bb2021 | |||
| b86f72f75c | |||
| 1a8b98d420 | |||
| 383a7d800f | |||
| 453561140a | |||
| f6d5d3755b | |||
| 5226fe090e | |||
| c10ad00ca7 | |||
| 64fc92c3d6 | |||
| b9c116d5b6 | |||
| 007200b37b | |||
| 9824ad1e18 | |||
| a8819c7551 | |||
| 8cdfbdd08f | |||
| b2d1dc9276 | |||
| 1f79b43a85 | |||
| 904619bccd | |||
| 14104f6469 | |||
| dccfb6f71f | |||
| 547266a705 | |||
| 273562b58c | |||
| dc39eed1a7 | |||
| 9178badfd0 | |||
| 38e75ec251 | |||
| c1496bf87b | |||
| 4da888b240 | |||
| c703be2ca5 | |||
| 5cec8add5e | |||
| 0225dbde3a | |||
| f84b8fa6c2 | |||
| 979cbcd23e | |||
| b3070e1919 | |||
| e5fdde8f30 | |||
| 7de36bbc3d | |||
| 1c4f27902e | |||
| 7ee86f0d2f | |||
| a0b06fd5ef | |||
| 630bb20b35 | |||
| 17ea2a35cb | |||
| 7d9376d607 | |||
| 122e949072 | |||
| 9a69b4c51e | |||
| 251151244b | |||
| 9d232b666b | |||
| 1832d77e78 | |||
| aca6bce1ff | |||
| 7bb2f405da | |||
| 60e2824167 | |||
| cffc228b3a | |||
| 318c366d82 | |||
| 90d7f79ca0 | |||
| 3f87038776 | |||
| 92b880f03b | |||
| 94f1e84857 | |||
| 221b4f10df | |||
| 225615f4ea | |||
| b8ef753f85 | |||
| 33edd22f8f | |||
| 75e9232095 | |||
| 6daddf11de | |||
| 36d9eda303 | |||
| 4eb2d4c689 | |||
| edc7119fbf | |||
| aa1736a285 | |||
| 6f93aa4f34 | |||
| 0662e6230e | |||
| 30f3f14040 | |||
| f2042f284e | |||
| b2c73ffa15 | |||
| d7217d1b3c | |||
| 638d55a36c | |||
| b11f6b5149 | |||
| d0b5ecf4f2 | |||
| 7a67c30a2c | |||
| 5ea4694eb8 | |||
| e01dabe6ed | |||
| ecaf0dd0fc | |||
| 3d4dcc9e6b | |||
| 28a5d9f219 | |||
| 81876d37ea | |||
| 4a6b159ddb | |||
| d84957cc8c | |||
| d53db5b49a | |||
| 0448368011 | |||
| 36754136fd | |||
| 489acccf77 | |||
| 8ef4db63ad | |||
| 9f63205ff3 | |||
| 5a0378948d | |||
| 2b4c45be74 | |||
| 147896dc80 | |||
| 1ff6ec7653 | |||
| acd590111e | |||
| b5f24ba1f2 | |||
| 79ed24135f | |||
| a4949a25b5 | |||
| f16edef124 | |||
| 2fd6479cb9 | |||
| 85a6b3a9a4 | |||
| 9ac5216d6e | |||
| 82987dbd20 | |||
| 29de7c0727 | |||
| 5f6580fa2f | |||
| 5d4732d75d | |||
| a13bac813a | |||
| 85dcc9f7bd | |||
| b696629ad9 | |||
| b9e3128718 |
@@ -7,7 +7,7 @@ jobs:
|
||||
name: Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
- run: cargo check
|
||||
|
||||
@@ -15,7 +15,7 @@ jobs:
|
||||
name: Test Suite
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
- run: cargo test
|
||||
|
||||
@@ -23,10 +23,10 @@ jobs:
|
||||
name: Trunk
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
toolchain: nightly
|
||||
target: wasm32-unknown-unknown
|
||||
- run: cargo install trunk
|
||||
- run: cd web; trunk build
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
name: Rustfmt
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
components: rustfmt
|
||||
@@ -46,7 +46,7 @@ jobs:
|
||||
name: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
- run: cargo build
|
||||
|
||||
@@ -54,7 +54,7 @@ jobs:
|
||||
name: Disallow unused dependencies
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: nightly
|
||||
|
||||
40
.github/copilot-instructions.md
vendored
Normal file
40
.github/copilot-instructions.md
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
# Copilot/AI Agent Instructions for Letterbox
|
||||
|
||||
## Project Overview
|
||||
- **Letterbox** is a Rust monorepo for a mail/newsreader system with a web frontend and a Rocket/GraphQL backend.
|
||||
- Major crates: `server` (backend, Rocket+async-graphql), `web` (Seed-based WASM frontend), `notmuch` (mail integration), `shared` (common types), `procmail2notmuch` (migration/utility).
|
||||
- Data flows: Email/news data is indexed and queried via the backend, exposed to the frontend via GraphQL. SQLx/Postgres is used for persistence. Notmuch and custom SQL are both used for mail storage/search.
|
||||
|
||||
## Key Workflows
|
||||
- **Development**: Use `dev.sh` to launch a tmux session with live-reloading for both frontend (`trunk serve`) and backend (`cargo watch ... run`).
|
||||
- **Build/Release**: Use `just patch|minor|major` for versioned releases (runs SQLx prepare, bumps versions, pushes). `Makefile`'s `release` target does similar steps.
|
||||
- **Frontend**: In `web/`, use `cargo make serve` and `cargo make watch` for local dev. See `web/README.md` for Seed-specific details.
|
||||
- **Backend**: In `server/`, run with `cargo run` or via the tmux/dev.sh workflow. SQL migrations are in `server/migrations/`.
|
||||
|
||||
## Project Conventions & Patterns
|
||||
- **GraphQL**: All API boundaries are defined in `server/src/graphql.rs`. Use the `Query`, `Mutation`, and `Subscription` roots. Types are defined with `async-graphql` derive macros.
|
||||
- **HTML Sanitization**: See `server/src/lib.rs` for custom HTML/CSS sanitization and transformation logic (e.g., `Transformer` trait, `sanitize_html`).
|
||||
- **Tag/Query Parsing**: The `Query` struct in `server/src/lib.rs` parses user queries into filters for notmuch/newsreader/tantivy.
|
||||
- **Shared Types**: Use the `shared` crate for types and helpers shared between frontend and backend.
|
||||
- **Custom SQL**: Raw SQL queries are in `server/sql/`. Use these for complex queries not handled by SQLx macros.
|
||||
- **Feature Flags**: The `tantivy` feature enables full-text search via Tantivy. Check for `#[cfg(feature = "tantivy")]` in backend code.
|
||||
|
||||
## Integration Points
|
||||
- **Notmuch**: Integrated via the `notmuch` crate for mail indexing/search.
|
||||
- **Postgres**: Used for newsreader and other persistent data (see `server/migrations/`).
|
||||
- **GraphQL**: All client-server communication is via GraphQL endpoints defined in the backend.
|
||||
- **Seed/Trunk**: Frontend is built with Seed (Rust/WASM) and served via Trunk.
|
||||
|
||||
## Examples
|
||||
- To add a new GraphQL query, update `server/src/graphql.rs` and expose it in the `QueryRoot`.
|
||||
- To add a new frontend page, add a module in `web/src/` and register it in the Seed app's router.
|
||||
- To run the full dev environment: `./dev.sh` (requires tmux, trunk, cargo-watch, etc.).
|
||||
|
||||
## References
|
||||
- See `web/README.md` for frontend/Seed workflow details.
|
||||
- See `Justfile` and `Makefile` for release/versioning automation.
|
||||
- See `server/src/lib.rs` and `server/src/graphql.rs` for backend architecture and conventions.
|
||||
- See `server/sql/` for custom SQL queries.
|
||||
|
||||
---
|
||||
If any conventions or workflows are unclear, please ask for clarification or check the referenced files for examples.
|
||||
4047
Cargo.lock
generated
4047
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,7 @@ authors = ["Bill Thiede <git@xinu.tv>"]
|
||||
edition = "2021"
|
||||
license = "UNLICENSED"
|
||||
publish = ["xinu"]
|
||||
version = "0.10.6"
|
||||
version = "0.17.62"
|
||||
repository = "https://git.z.xinu.tv/wathiede/letterbox"
|
||||
|
||||
[profile.dev]
|
||||
|
||||
2
dev.sh
2
dev.sh
@@ -3,5 +3,5 @@ tmux new-session -d -s letterbox-dev
|
||||
tmux rename-window web
|
||||
tmux send-keys "cd web; trunk serve -w ../.git -w ../shared -w ../notmuch -w ./" C-m
|
||||
tmux new-window -n server
|
||||
tmux send-keys "cd server; cargo watch -c -x run -w ../.git -w ../shared -w ../notmuch -w ./" C-m
|
||||
tmux send-keys "cd server; cargo watch -c -w ../.git -w ../shared -w ../notmuch -w ./ -x 'run postgres://newsreader@nixos-07.h.xinu.tv/newsreader ../target/database/newsreader /tmp/letterbox/slurp'" C-m
|
||||
tmux attach -d -t letterbox-dev
|
||||
|
||||
@@ -11,14 +11,14 @@ version.workspace = true
|
||||
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.14"
|
||||
mailparse = "0.16.0"
|
||||
log = "0.4.27"
|
||||
mailparse = "0.16.1"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = { version = "1.0", features = ["unbounded_depth"] }
|
||||
thiserror = "2.0.0"
|
||||
thiserror = "2.0.12"
|
||||
tracing = "0.1.41"
|
||||
|
||||
[dev-dependencies]
|
||||
itertools = "0.14.0"
|
||||
pretty_assertions = "1"
|
||||
rayon = "1.5"
|
||||
rayon = "1.10"
|
||||
|
||||
@@ -214,9 +214,8 @@ use std::{
|
||||
process::Command,
|
||||
};
|
||||
|
||||
use log::{error, info};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tracing::instrument;
|
||||
use tracing::{error, info, instrument, warn};
|
||||
|
||||
/// # Number of seconds since the Epoch
|
||||
pub type UnixTime = isize;
|
||||
@@ -470,7 +469,7 @@ pub enum NotmuchError {
|
||||
MailParseError(#[from] mailparse::MailParseError),
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[derive(Clone, Default)]
|
||||
pub struct Notmuch {
|
||||
config_path: Option<PathBuf>,
|
||||
}
|
||||
@@ -503,15 +502,28 @@ impl Notmuch {
|
||||
self.tags_for_query("*")
|
||||
}
|
||||
|
||||
#[instrument(skip_all, fields(tag=tag,search_term=search_term))]
|
||||
pub fn tag_add(&self, tag: &str, search_term: &str) -> Result<(), NotmuchError> {
|
||||
self.run_notmuch(["tag", &format!("+{tag}"), search_term])?;
|
||||
self.tags_add(tag, &[search_term])
|
||||
}
|
||||
|
||||
#[instrument(skip_all, fields(tag=tag,search_term=?search_term))]
|
||||
pub fn tags_add(&self, tag: &str, search_term: &[&str]) -> Result<(), NotmuchError> {
|
||||
let tag = format!("+{tag}");
|
||||
let mut args = vec!["tag", &tag];
|
||||
args.extend(search_term);
|
||||
self.run_notmuch(&args)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[instrument(skip_all, fields(tag=tag,search_term=search_term))]
|
||||
pub fn tag_remove(&self, tag: &str, search_term: &str) -> Result<(), NotmuchError> {
|
||||
self.run_notmuch(["tag", &format!("-{tag}"), search_term])?;
|
||||
self.tags_remove(tag, &[search_term])
|
||||
}
|
||||
#[instrument(skip_all, fields(tag=tag,search_term=?search_term))]
|
||||
pub fn tags_remove(&self, tag: &str, search_term: &[&str]) -> Result<(), NotmuchError> {
|
||||
let tag = format!("-{tag}");
|
||||
let mut args = vec!["tag", &tag];
|
||||
args.extend(search_term);
|
||||
self.run_notmuch(&args)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -598,6 +610,11 @@ impl Notmuch {
|
||||
|
||||
#[instrument(skip_all, fields(id=id,part=part))]
|
||||
pub fn show_original_part(&self, id: &MessageId, part: usize) -> Result<Vec<u8>, NotmuchError> {
|
||||
let id = if id.starts_with("id:") {
|
||||
id
|
||||
} else {
|
||||
&format!("id:{id}")
|
||||
};
|
||||
let res = self.run_notmuch(["show", "--part", &part.to_string(), id])?;
|
||||
Ok(res)
|
||||
}
|
||||
@@ -700,6 +717,13 @@ impl Notmuch {
|
||||
cmd.args(args);
|
||||
info!("{:?}", &cmd);
|
||||
let out = cmd.output()?;
|
||||
if !out.stderr.is_empty() {
|
||||
warn!(
|
||||
"{:?}: STDERR:\n{}",
|
||||
&cmd,
|
||||
String::from_utf8_lossy(&out.stderr)
|
||||
);
|
||||
}
|
||||
Ok(out.stdout)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,4 +11,10 @@ version.workspace = true
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1.0.69"
|
||||
anyhow = "1.0.98"
|
||||
clap = { version = "4.5.37", features = ["derive", "env"] }
|
||||
letterbox-notmuch = { version = "0.17", registry = "xinu" }
|
||||
letterbox-shared = { version = "0.17", registry = "xinu" }
|
||||
serde = { version = "1.0.219", features = ["derive"] }
|
||||
sqlx = { version = "0.8.5", features = ["postgres", "runtime-tokio"] }
|
||||
tokio = { version = "1.44.2", features = ["rt", "macros", "rt-multi-thread"] }
|
||||
|
||||
@@ -1,210 +1,36 @@
|
||||
use std::{convert::Infallible, io::Write, str::FromStr};
|
||||
use std::{collections::HashMap, io::Write};
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
enum MatchType {
|
||||
From,
|
||||
Sender,
|
||||
To,
|
||||
Cc,
|
||||
Subject,
|
||||
List,
|
||||
DeliveredTo,
|
||||
XForwardedTo,
|
||||
ReplyTo,
|
||||
XOriginalTo,
|
||||
XSpam,
|
||||
Body,
|
||||
#[default]
|
||||
Unknown,
|
||||
}
|
||||
#[derive(Debug, Default)]
|
||||
struct Match {
|
||||
match_type: MatchType,
|
||||
needle: String,
|
||||
use clap::{Parser, Subcommand};
|
||||
use letterbox_shared::{cleanup_match, Match, MatchType, Rule};
|
||||
use sqlx::{types::Json, PgPool};
|
||||
|
||||
#[derive(Debug, Subcommand)]
|
||||
enum Mode {
|
||||
Debug,
|
||||
Notmuchrc,
|
||||
LoadSql {
|
||||
#[arg(short, long)]
|
||||
dsn: String,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
struct Rule {
|
||||
matches: Vec<Match>,
|
||||
tags: Vec<String>,
|
||||
/// Simple program to greet a person
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(version, about, long_about = None)]
|
||||
struct Args {
|
||||
#[arg(short, long, default_value = "/home/wathiede/dotfiles/procmailrc")]
|
||||
input: String,
|
||||
|
||||
#[command(subcommand)]
|
||||
mode: Mode,
|
||||
}
|
||||
|
||||
fn unescape(s: &str) -> String {
|
||||
s.replace('\\', "")
|
||||
}
|
||||
|
||||
fn cleanup_match(prefix: &str, s: &str) -> String {
|
||||
unescape(&s[prefix.len()..]).replace(".*", "")
|
||||
}
|
||||
|
||||
mod matches {
|
||||
pub const TO: &'static str = "TO";
|
||||
pub const CC: &'static str = "Cc";
|
||||
pub const TOCC: &'static str = "(TO|Cc)";
|
||||
pub const FROM: &'static str = "From";
|
||||
pub const SENDER: &'static str = "Sender";
|
||||
pub const SUBJECT: &'static str = "Subject";
|
||||
pub const DELIVERED_TO: &'static str = "Delivered-To";
|
||||
pub const X_FORWARDED_TO: &'static str = "X-Forwarded-To";
|
||||
pub const REPLY_TO: &'static str = "Reply-To";
|
||||
pub const X_ORIGINAL_TO: &'static str = "X-Original-To";
|
||||
pub const LIST_ID: &'static str = "List-ID";
|
||||
pub const X_SPAM: &'static str = "X-Spam";
|
||||
pub const X_SPAM_FLAG: &'static str = "X-Spam-Flag";
|
||||
}
|
||||
|
||||
impl FromStr for Match {
|
||||
type Err = Infallible;
|
||||
|
||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||
// Examples:
|
||||
// "* 1^0 ^TOsonyrewards.com@xinu.tv"
|
||||
// "* ^TOsonyrewards.com@xinu.tv"
|
||||
let mut it = s.split_whitespace().skip(1);
|
||||
let mut needle = it.next().unwrap();
|
||||
if needle == "1^0" {
|
||||
needle = it.next().unwrap();
|
||||
}
|
||||
let mut needle = vec![needle];
|
||||
needle.extend(it);
|
||||
let needle = needle.join(" ");
|
||||
let first = needle.chars().nth(0).unwrap_or(' ');
|
||||
use matches::*;
|
||||
if first == '^' {
|
||||
let needle = &needle[1..];
|
||||
if needle.starts_with(TO) {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::To,
|
||||
needle: cleanup_match(TO, needle),
|
||||
});
|
||||
} else if needle.starts_with(FROM) {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::From,
|
||||
needle: cleanup_match(FROM, needle),
|
||||
});
|
||||
} else if needle.starts_with(CC) {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::Cc,
|
||||
needle: cleanup_match(CC, needle),
|
||||
});
|
||||
} else if needle.starts_with(TOCC) {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::To,
|
||||
needle: cleanup_match(TOCC, needle),
|
||||
});
|
||||
} else if needle.starts_with(SENDER) {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::Sender,
|
||||
needle: cleanup_match(SENDER, needle),
|
||||
});
|
||||
} else if needle.starts_with(SUBJECT) {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::Subject,
|
||||
needle: cleanup_match(SUBJECT, needle),
|
||||
});
|
||||
} else if needle.starts_with(X_ORIGINAL_TO) {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::XOriginalTo,
|
||||
needle: cleanup_match(X_ORIGINAL_TO, needle),
|
||||
});
|
||||
} else if needle.starts_with(LIST_ID) {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::List,
|
||||
needle: cleanup_match(LIST_ID, needle),
|
||||
});
|
||||
} else if needle.starts_with(REPLY_TO) {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::ReplyTo,
|
||||
needle: cleanup_match(REPLY_TO, needle),
|
||||
});
|
||||
} else if needle.starts_with(X_SPAM_FLAG) {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::XSpam,
|
||||
needle: '*'.to_string(),
|
||||
});
|
||||
} else if needle.starts_with(X_SPAM) {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::XSpam,
|
||||
needle: '*'.to_string(),
|
||||
});
|
||||
} else if needle.starts_with(DELIVERED_TO) {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::DeliveredTo,
|
||||
needle: cleanup_match(DELIVERED_TO, needle),
|
||||
});
|
||||
} else if needle.starts_with(X_FORWARDED_TO) {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::XForwardedTo,
|
||||
needle: cleanup_match(X_FORWARDED_TO, needle),
|
||||
});
|
||||
} else {
|
||||
unreachable!("needle: '{needle}'")
|
||||
}
|
||||
} else {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::Body,
|
||||
needle: cleanup_match("", &needle),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn notmuch_from_rules<W: Write>(mut w: W, rules: &[Rule]) -> anyhow::Result<()> {
|
||||
// TODO(wathiede): if reindexing this many tags is too slow, see if combining rules per tag is
|
||||
// faster.
|
||||
let mut lines = Vec::new();
|
||||
for r in rules {
|
||||
for m in &r.matches {
|
||||
for t in &r.tags {
|
||||
if let MatchType::Unknown = m.match_type {
|
||||
eprintln!("rule has unknown match {:?}", r);
|
||||
continue;
|
||||
}
|
||||
|
||||
let rule = match m.match_type {
|
||||
MatchType::From => "from:",
|
||||
// TODO(wathiede): something more specific?
|
||||
MatchType::Sender => "from:",
|
||||
MatchType::To => "to:",
|
||||
MatchType::Cc => "to:",
|
||||
MatchType::Subject => "subject:",
|
||||
MatchType::List => "List-ID:",
|
||||
MatchType::Body => "",
|
||||
// TODO(wathiede): these will probably require adding fields to notmuch
|
||||
// index. Handle them later.
|
||||
MatchType::DeliveredTo
|
||||
| MatchType::XForwardedTo
|
||||
| MatchType::ReplyTo
|
||||
| MatchType::XOriginalTo
|
||||
| MatchType::XSpam => continue,
|
||||
MatchType::Unknown => unreachable!(),
|
||||
};
|
||||
// Preserve unread status if run with --remove-all
|
||||
lines.push(format!(
|
||||
r#"-unprocessed +{} +unread -- is:unread tag:unprocessed {}"{}""#,
|
||||
t, rule, m.needle
|
||||
));
|
||||
lines.push(format!(
|
||||
// TODO(wathiede): this assumes `notmuch new` is configured to add
|
||||
// `tag:unprocessed` to all new mail.
|
||||
r#"-unprocessed +{} -- tag:unprocessed {}"{}""#,
|
||||
t, rule, m.needle
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
lines.sort();
|
||||
for l in lines {
|
||||
writeln!(w, "{l}")?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn main() -> anyhow::Result<()> {
|
||||
let input = "/home/wathiede/dotfiles/procmailrc";
|
||||
#[tokio::main]
|
||||
async fn main() -> anyhow::Result<()> {
|
||||
let args = Args::parse();
|
||||
let mut rules = Vec::new();
|
||||
let mut cur_rule = Rule::default();
|
||||
for l in std::fs::read_to_string(input)?.lines() {
|
||||
for l in std::fs::read_to_string(args.input)?.lines() {
|
||||
let l = if let Some(idx) = l.find('#') {
|
||||
&l[..idx]
|
||||
} else {
|
||||
@@ -222,6 +48,9 @@ fn main() -> anyhow::Result<()> {
|
||||
match first {
|
||||
':' => {
|
||||
// start of rule
|
||||
|
||||
// If carbon-copy flag present, don't stop on match
|
||||
cur_rule.stop_on_match = !l.contains('c');
|
||||
}
|
||||
'*' => {
|
||||
// add to current rule
|
||||
@@ -230,26 +59,119 @@ fn main() -> anyhow::Result<()> {
|
||||
}
|
||||
'.' => {
|
||||
// delivery to folder
|
||||
cur_rule.tags.push(cleanup_match(
|
||||
cur_rule.tag = cleanup_match(
|
||||
"",
|
||||
&l.replace('.', "/")
|
||||
.replace(' ', "")
|
||||
.trim_matches('/')
|
||||
.to_string(),
|
||||
));
|
||||
);
|
||||
rules.push(cur_rule);
|
||||
cur_rule = Rule::default();
|
||||
}
|
||||
'/' => cur_rule = Rule::default(), // Ex. /dev/null
|
||||
'|' => cur_rule = Rule::default(), // external command
|
||||
'$' => {
|
||||
// TODO(wathiede): tag messages with no other tag as 'inbox'
|
||||
cur_rule.tags.push(cleanup_match("", "inbox"));
|
||||
cur_rule.tag = cleanup_match("", "inbox");
|
||||
rules.push(cur_rule);
|
||||
cur_rule = Rule::default();
|
||||
} // variable, should only be $DEFAULT in my config
|
||||
_ => panic!("Unhandled first character '{}' {}", first, l),
|
||||
_ => panic!("Unhandled first character '{}'\nLine: {}", first, l),
|
||||
}
|
||||
}
|
||||
notmuch_from_rules(std::io::stdout(), &rules)?;
|
||||
match args.mode {
|
||||
Mode::Debug => print_rules(&rules),
|
||||
Mode::Notmuchrc => notmuch_from_rules(std::io::stdout(), &rules)?,
|
||||
Mode::LoadSql { dsn } => load_sql(&dsn, &rules).await?,
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn print_rules(rules: &[Rule]) {
|
||||
let mut tally = HashMap::new();
|
||||
for r in rules {
|
||||
for m in &r.matches {
|
||||
*tally.entry(m.match_type).or_insert(0) += 1;
|
||||
}
|
||||
}
|
||||
let mut sorted: Vec<_> = tally.iter().map(|(k, v)| (v, k)).collect();
|
||||
sorted.sort();
|
||||
sorted.reverse();
|
||||
for (v, k) in sorted {
|
||||
println!("{k:?}: {v}");
|
||||
}
|
||||
}
|
||||
|
||||
fn notmuch_from_rules<W: Write>(mut w: W, rules: &[Rule]) -> anyhow::Result<()> {
|
||||
// TODO(wathiede): if reindexing this many tags is too slow, see if combining rules per tag is
|
||||
// faster.
|
||||
let mut lines = Vec::new();
|
||||
for r in rules {
|
||||
for m in &r.matches {
|
||||
let t = &r.tag;
|
||||
if let MatchType::Unknown = m.match_type {
|
||||
eprintln!("rule has unknown match {:?}", r);
|
||||
continue;
|
||||
}
|
||||
|
||||
let rule = match m.match_type {
|
||||
MatchType::From => "from:",
|
||||
// TODO(wathiede): something more specific?
|
||||
MatchType::Sender => "from:",
|
||||
MatchType::To => "to:",
|
||||
MatchType::Cc => "to:",
|
||||
MatchType::Subject => "subject:",
|
||||
MatchType::ListId => "List-ID:",
|
||||
MatchType::Body => "",
|
||||
// TODO(wathiede): these will probably require adding fields to notmuch
|
||||
// index. Handle them later.
|
||||
MatchType::DeliveredTo
|
||||
| MatchType::XForwardedTo
|
||||
| MatchType::ReplyTo
|
||||
| MatchType::XOriginalTo
|
||||
| MatchType::XSpam => continue,
|
||||
MatchType::Unknown => unreachable!(),
|
||||
};
|
||||
// Preserve unread status if run with --remove-all
|
||||
lines.push(format!(
|
||||
r#"-unprocessed +{} +unread -- is:unread tag:unprocessed {}"{}""#,
|
||||
t, rule, m.needle
|
||||
));
|
||||
lines.push(format!(
|
||||
// TODO(wathiede): this assumes `notmuch new` is configured to add
|
||||
// `tag:unprocessed` to all new mail.
|
||||
r#"-unprocessed +{} -- tag:unprocessed {}"{}""#,
|
||||
t, rule, m.needle
|
||||
));
|
||||
}
|
||||
}
|
||||
lines.sort();
|
||||
for l in lines {
|
||||
writeln!(w, "{l}")?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn load_sql(dsn: &str, rules: &[Rule]) -> anyhow::Result<()> {
|
||||
let pool = PgPool::connect(dsn).await?;
|
||||
println!("clearing email_rule table");
|
||||
sqlx::query!("DELETE FROM email_rule")
|
||||
.execute(&pool)
|
||||
.await?;
|
||||
|
||||
for (order, rule) in rules.iter().enumerate() {
|
||||
println!("inserting {order}: {rule:?}");
|
||||
sqlx::query!(
|
||||
r#"
|
||||
INSERT INTO email_rule (sort_order, rule)
|
||||
VALUES ($1, $2)
|
||||
"#,
|
||||
order as i32,
|
||||
Json(rule) as _
|
||||
)
|
||||
.execute(&pool)
|
||||
.await?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -3,4 +3,11 @@
|
||||
"extends": [
|
||||
"config:recommended"
|
||||
]
|
||||
,
|
||||
"packageRules": [
|
||||
{
|
||||
"matchPackageNames": ["wasm-bindgen"],
|
||||
"enabled": false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "\nSELECT\n url\nFROM email_photo ep\nJOIN email_address ea\nON ep.id = ea.email_photo_id\nWHERE\n address = $1\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "url",
|
||||
"type_info": "Text"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "126e16a4675e8d79f330b235f9e1b8614ab1e1526e4e69691c5ebc70d54a42ef"
|
||||
}
|
||||
14
server/.sqlx/query-77f79f981a9736d18ffd4b87d3aec34d6a048162154a3aba833370c58a860795.json
generated
Normal file
14
server/.sqlx/query-77f79f981a9736d18ffd4b87d3aec34d6a048162154a3aba833370c58a860795.json
generated
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "DELETE FROM snooze WHERE id = $1",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Int4"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "77f79f981a9736d18ffd4b87d3aec34d6a048162154a3aba833370c58a860795"
|
||||
}
|
||||
26
server/.sqlx/query-c8383663124a5cc5912b54553f18f7064d33087ebfdf3c0c1c43cbe6d3577084.json
generated
Normal file
26
server/.sqlx/query-c8383663124a5cc5912b54553f18f7064d33087ebfdf3c0c1c43cbe6d3577084.json
generated
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "\nSELECT id, message_id\nFROM snooze\nWHERE wake < NOW();\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Int4"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "message_id",
|
||||
"type_info": "Text"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": []
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "c8383663124a5cc5912b54553f18f7064d33087ebfdf3c0c1c43cbe6d3577084"
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "SELECT\n p.id,\n link,\n clean_summary\nFROM\n post AS p\nINNER JOIN feed AS f ON p.site = f.slug -- necessary to weed out nzb posts\nWHERE\n search_summary IS NULL\n -- TODO remove AND link ~ '^<'\nORDER BY\n ROW_NUMBER() OVER (PARTITION BY site ORDER BY date DESC)\nLIMIT 100;\n",
|
||||
"query": "SELECT\n p.id,\n link,\n clean_summary\nFROM\n post AS p\nINNER JOIN feed AS f ON p.site = f.slug -- necessary to weed out nzb posts\nWHERE\n search_summary IS NULL\n -- TODO remove AND link ~ '^<'\nORDER BY\n ROW_NUMBER() OVER (PARTITION BY site ORDER BY date DESC)\nLIMIT 1000;\n",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
@@ -28,5 +28,5 @@
|
||||
true
|
||||
]
|
||||
},
|
||||
"hash": "3d271b404f06497a5dcde68cf6bf07291d70fa56058ea736ac24e91d33050c04"
|
||||
"hash": "cf369e3d5547f400cb54004dd03783ef6998a000aec91c50a79405dcf1c53b17"
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "\nSELECT id\nFROM feed\nWHERE slug = $1\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Int4"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "dabd12987369cb273c0191d46645c376439d246d5a697340574c6afdac93d2cc"
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "\nINSERT INTO feed ( name, slug, url, homepage, selector )\nVALUES ( $1, $2, $3, '', '' )\nRETURNING id\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "id",
|
||||
"type_info": "Int4"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text",
|
||||
"Text",
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "e2a448aaf4fe92fc1deda10bf844f6b9225d35758cba7c9f337c1a730aee41bd"
|
||||
}
|
||||
15
server/.sqlx/query-effd0d0d91e6ad84546f7177f1fd39d4fad736b471eb5e55fd5ac74f7adff664.json
generated
Normal file
15
server/.sqlx/query-effd0d0d91e6ad84546f7177f1fd39d4fad736b471eb5e55fd5ac74f7adff664.json
generated
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "\n INSERT INTO snooze (message_id, wake)\n VALUES ($1, $2)\n ON CONFLICT (message_id) DO UPDATE\n SET wake = $2\n ",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text",
|
||||
"Timestamptz"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "effd0d0d91e6ad84546f7177f1fd39d4fad736b471eb5e55fd5ac74f7adff664"
|
||||
}
|
||||
@@ -12,46 +12,55 @@ version.workspace = true
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
ammonia = "4.0.0"
|
||||
anyhow = "1.0.79"
|
||||
async-graphql = { version = "7", features = ["log"] }
|
||||
async-graphql-rocket = "7"
|
||||
async-trait = "0.1.81"
|
||||
build-info = "0.0.40"
|
||||
cacher = { version = "0.1.0", registry = "xinu" }
|
||||
chrono = "0.4.39"
|
||||
clap = { version = "4.5.23", features = ["derive"] }
|
||||
css-inline = "0.14.0"
|
||||
chrono-tz = "0.10"
|
||||
html2text = "0.16"
|
||||
ammonia = "4.1.0"
|
||||
anyhow = "1.0.98"
|
||||
askama = { version = "0.15.0", features = ["derive"] }
|
||||
async-graphql = { version = "7", features = ["log", "chrono"] }
|
||||
async-graphql-axum = "7.0.16"
|
||||
async-trait = "0.1.88"
|
||||
axum = { version = "0.8.3", features = ["ws"] }
|
||||
axum-macros = "0.5.0"
|
||||
build-info = "0.0.42"
|
||||
cacher = { version = "0.2.0", registry = "xinu" }
|
||||
chrono = "0.4.40"
|
||||
clap = { version = "4.5.37", features = ["derive"] }
|
||||
css-inline = "0.19.0"
|
||||
flate2 = "1.1.2"
|
||||
futures = "0.3.31"
|
||||
headers = "0.4.0"
|
||||
html-escape = "0.2.13"
|
||||
ical = "0.11"
|
||||
letterbox-notmuch = { path = "../notmuch", version = "0.17", registry = "xinu" }
|
||||
letterbox-shared = { path = "../shared", version = "0.17", registry = "xinu" }
|
||||
linkify = "0.10.0"
|
||||
log = "0.4.17"
|
||||
lol_html = "2.0.0"
|
||||
mailparse = "0.16.0"
|
||||
lol_html = "2.3.0"
|
||||
mailparse = "0.16.1"
|
||||
maplit = "1.0.2"
|
||||
memmap = "0.7.0"
|
||||
quick-xml = { version = "0.39.0", features = ["serialize"] }
|
||||
regex = "1.11.1"
|
||||
reqwest = { version = "0.12.7", features = ["blocking"] }
|
||||
rocket = { version = "0.5.0-rc.2", features = ["json"] }
|
||||
rocket_cors = "0.6.0"
|
||||
scraper = "0.23.0"
|
||||
serde = { version = "1.0.147", features = ["derive"] }
|
||||
serde_json = "1.0.87"
|
||||
sqlx = { version = "0.8.2", features = ["postgres", "runtime-tokio", "time"] }
|
||||
tantivy = { version = "0.22.0", optional = true }
|
||||
thiserror = "2.0.0"
|
||||
tokio = "1.26.0"
|
||||
reqwest = { version = "0.13.0", features = ["blocking"] }
|
||||
scraper = "0.25.0"
|
||||
serde = { version = "1.0.219", features = ["derive"] }
|
||||
serde_json = "1.0.140"
|
||||
sqlx = { version = "0.8.5", features = ["postgres", "runtime-tokio", "chrono"] }
|
||||
tantivy = { version = "0.25.0", optional = true }
|
||||
thiserror = "2.0.12"
|
||||
tokio = "1.44.2"
|
||||
tower-http = { version = "0.6.2", features = ["trace"] }
|
||||
tracing = "0.1.41"
|
||||
url = "2.5.2"
|
||||
url = "2.5.4"
|
||||
urlencoding = "2.1.3"
|
||||
#xtracing = { path = "../../xtracing" }
|
||||
#xtracing = { git = "http://git-private.h.xinu.tv/wathiede/xtracing.git" }
|
||||
xtracing = { version = "0.3.0", registry = "xinu" }
|
||||
letterbox-notmuch = { version = "0.10.6", path = "../notmuch", registry = "xinu" }
|
||||
letterbox-shared = { version = "0.10.6", path = "../shared", registry = "xinu" }
|
||||
#xtracing = { path = "../../xtracing" }
|
||||
xtracing = { version = "0.3.2", registry = "xinu" }
|
||||
zip = { version = "7.0.0", default-features = false, features = ["aes-crypto", "bzip2", "deflate64", "deflate", "time", "zstd"] }
|
||||
|
||||
|
||||
[build-dependencies]
|
||||
build-info-build = "0.0.40"
|
||||
build-info-build = "0.0.42"
|
||||
|
||||
[features]
|
||||
#default = [ "tantivy" ]
|
||||
|
||||
@@ -5,7 +5,6 @@ newsreader_database_url = "postgres://newsreader@nixos-07.h.xinu.tv/newsreader"
|
||||
newsreader_tantivy_db_path = "../target/database/newsreader"
|
||||
|
||||
[debug]
|
||||
address = "0.0.0.0"
|
||||
port = 9345
|
||||
# Uncomment to make it production like.
|
||||
#log_level = "critical"
|
||||
|
||||
@@ -2,4 +2,5 @@ fn main() {
|
||||
// Calling `build_info_build::build_script` collects all data and makes it available to `build_info::build_info!`
|
||||
// and `build_info::format!` in the main program.
|
||||
build_info_build::build_script();
|
||||
println!("cargo:rerun-if-changed=templates");
|
||||
}
|
||||
|
||||
3
server/migrations/20250419202131_email-rules.down.sql
Normal file
3
server/migrations/20250419202131_email-rules.down.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
DROP TABLE IF NOT EXISTS email_rule;
|
||||
|
||||
-- Add down migration script here
|
||||
5
server/migrations/20250419202131_email-rules.up.sql
Normal file
5
server/migrations/20250419202131_email-rules.up.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
CREATE TABLE IF NOT EXISTS email_rule (
|
||||
id integer NOT NULL GENERATED ALWAYS AS IDENTITY,
|
||||
sort_order integer NOT NULL,
|
||||
rule jsonb NOT NULL
|
||||
);
|
||||
2
server/migrations/20250623193718_disable-feed.down.sql
Normal file
2
server/migrations/20250623193718_disable-feed.down.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- Add down migration script here
|
||||
ALTER TABLE feed DROP COLUMN IF EXISTS disabled;
|
||||
2
server/migrations/20250623193718_disable-feed.up.sql
Normal file
2
server/migrations/20250623193718_disable-feed.up.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- Add up migration script here
|
||||
ALTER TABLE feed ADD disabled boolean;
|
||||
2
server/migrations/20250630023836_snooze.down.sql
Normal file
2
server/migrations/20250630023836_snooze.down.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- Add down migration script here
|
||||
DROP TABLE IF EXISTS snooze;
|
||||
6
server/migrations/20250630023836_snooze.up.sql
Normal file
6
server/migrations/20250630023836_snooze.up.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
-- Add up migration script here
|
||||
CREATE TABLE IF NOT EXISTS snooze (
|
||||
id integer NOT NULL GENERATED ALWAYS AS IDENTITY,
|
||||
message_id text NOT NULL UNIQUE,
|
||||
wake timestamptz NOT NULL
|
||||
);
|
||||
@@ -0,0 +1,2 @@
|
||||
DROP INDEX IF EXISTS movie_sets_year_id_idx;
|
||||
DROP INDEX IF EXISTS movie_sets_year_idx;
|
||||
@@ -0,0 +1,6 @@
|
||||
-- Add index on movie_sets.year to speed up year-based queries
|
||||
CREATE INDEX movie_sets_year_idx ON movie_sets(year);
|
||||
|
||||
-- Composite index for queries that filter by year and return id
|
||||
-- This can make the subquery in UPDATE statements even faster
|
||||
CREATE INDEX movie_sets_year_id_idx ON movie_sets(year, id);
|
||||
1
server/sql/label_unprocessed.sql
Normal file
1
server/sql/label_unprocessed.sql
Normal file
@@ -0,0 +1 @@
|
||||
SELECT rule as "rule: Json<Rule>" FROM email_rule ORDER BY sort_order
|
||||
@@ -10,4 +10,4 @@ WHERE
|
||||
-- TODO remove AND link ~ '^<'
|
||||
ORDER BY
|
||||
ROW_NUMBER() OVER (PARTITION BY site ORDER BY date DESC)
|
||||
LIMIT 100;
|
||||
LIMIT 1000;
|
||||
|
||||
1
server/sql/photo_url_for_email_address.sql
Normal file
1
server/sql/photo_url_for_email_address.sql
Normal file
@@ -0,0 +1 @@
|
||||
SELECT url FROM email_photo ep JOIN email_address ea ON ep.id = ea.email_photo_id WHERE address = $1
|
||||
@@ -1,22 +0,0 @@
|
||||
use clap::Parser;
|
||||
use letterbox_server::mail::read_mail_to_db;
|
||||
use sqlx::postgres::PgPool;
|
||||
|
||||
/// Add certain emails as posts in newsfeed app.
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(author, version, about, long_about = None)]
|
||||
struct Args {
|
||||
/// DB URL, something like postgres://newsreader@nixos-07.h.xinu.tv/newsreader
|
||||
#[arg(short, long)]
|
||||
db_url: String,
|
||||
/// path to parse
|
||||
path: String,
|
||||
}
|
||||
#[tokio::main]
|
||||
async fn main() -> anyhow::Result<()> {
|
||||
let _guard = xtracing::init(env!("CARGO_BIN_NAME"))?;
|
||||
let args = Args::parse();
|
||||
let pool = PgPool::connect(&args.db_url).await?;
|
||||
read_mail_to_db(&pool, &args.path).await?;
|
||||
Ok(())
|
||||
}
|
||||
@@ -1,114 +1,101 @@
|
||||
// Rocket generates a lot of warnings for handlers
|
||||
// TODO: figure out why
|
||||
#![allow(unreachable_patterns)]
|
||||
#[macro_use]
|
||||
extern crate rocket;
|
||||
use std::{error::Error, io::Cursor, str::FromStr};
|
||||
use std::{error::Error, net::SocketAddr, sync::Arc, time::Duration};
|
||||
|
||||
use async_graphql::{extensions, http::GraphiQLSource, EmptySubscription, Schema};
|
||||
use async_graphql_rocket::{GraphQLQuery, GraphQLRequest, GraphQLResponse};
|
||||
use async_graphql::{extensions, http::GraphiQLSource, Schema};
|
||||
use async_graphql_axum::{GraphQL, GraphQLSubscription};
|
||||
//allows to extract the IP of connecting user
|
||||
use axum::extract::connect_info::ConnectInfo;
|
||||
use axum::{
|
||||
extract::{self, ws::WebSocketUpgrade, Query, State},
|
||||
http::{header, StatusCode},
|
||||
response::{self, IntoResponse, Response},
|
||||
routing::{any, get, post},
|
||||
Router,
|
||||
};
|
||||
use cacher::FilesystemCacher;
|
||||
use letterbox_notmuch::{Notmuch, NotmuchError, ThreadSet};
|
||||
use clap::Parser;
|
||||
use letterbox_notmuch::Notmuch;
|
||||
#[cfg(feature = "tantivy")]
|
||||
use letterbox_server::tantivy::TantivyConnection;
|
||||
use letterbox_server::{
|
||||
config::Config,
|
||||
error::ServerError,
|
||||
graphql::{Attachment, GraphqlSchema, Mutation, QueryRoot},
|
||||
nm::{attachment_bytes, cid_attachment_bytes},
|
||||
graphql::{compute_catchup_ids, Attachment, MutationRoot, QueryRoot, SubscriptionRoot},
|
||||
nm::{attachment_bytes, cid_attachment_bytes, label_unprocessed},
|
||||
ws::ConnectionTracker,
|
||||
};
|
||||
use rocket::{
|
||||
fairing::AdHoc,
|
||||
http::{ContentType, Header},
|
||||
request::Request,
|
||||
response::{content, Debug, Responder},
|
||||
serde::json::Json,
|
||||
Response, State,
|
||||
};
|
||||
use rocket_cors::{AllowedHeaders, AllowedOrigins};
|
||||
use letterbox_shared::WebsocketMessage;
|
||||
use serde::Deserialize;
|
||||
use sqlx::postgres::PgPool;
|
||||
use tokio::{net::TcpListener, sync::Mutex};
|
||||
use tower_http::trace::{DefaultMakeSpan, TraceLayer};
|
||||
use tracing::{error, info};
|
||||
|
||||
#[get("/show/<query>/pretty")]
|
||||
async fn show_pretty(
|
||||
nm: &State<Notmuch>,
|
||||
query: &str,
|
||||
) -> Result<Json<ThreadSet>, Debug<ServerError>> {
|
||||
let query = urlencoding::decode(query).map_err(|e| ServerError::from(NotmuchError::from(e)))?;
|
||||
let res = nm.show(&query).map_err(ServerError::from)?;
|
||||
Ok(Json(res))
|
||||
// Make our own error that wraps `ServerError`.
|
||||
struct AppError(letterbox_server::ServerError);
|
||||
|
||||
// Tell axum how to convert `AppError` into a response.
|
||||
impl IntoResponse for AppError {
|
||||
fn into_response(self) -> Response {
|
||||
(
|
||||
StatusCode::INTERNAL_SERVER_ERROR,
|
||||
format!("Something went wrong: {}", self.0),
|
||||
)
|
||||
.into_response()
|
||||
}
|
||||
}
|
||||
|
||||
#[get("/show/<query>")]
|
||||
async fn show(nm: &State<Notmuch>, query: &str) -> Result<Json<ThreadSet>, Debug<NotmuchError>> {
|
||||
let query = urlencoding::decode(query).map_err(NotmuchError::from)?;
|
||||
let res = nm.show(&query)?;
|
||||
Ok(Json(res))
|
||||
}
|
||||
|
||||
struct InlineAttachmentResponder(Attachment);
|
||||
|
||||
impl<'r, 'o: 'r> Responder<'r, 'o> for InlineAttachmentResponder {
|
||||
fn respond_to(self, _: &'r Request<'_>) -> rocket::response::Result<'o> {
|
||||
let mut resp = Response::build();
|
||||
if let Some(filename) = self.0.filename {
|
||||
resp.header(Header::new(
|
||||
"Content-Disposition",
|
||||
format!(r#"inline; filename="{}""#, filename),
|
||||
));
|
||||
}
|
||||
if let Some(content_type) = self.0.content_type {
|
||||
if let Some(ct) = ContentType::parse_flexible(&content_type) {
|
||||
resp.header(ct);
|
||||
}
|
||||
}
|
||||
resp.sized_body(self.0.bytes.len(), Cursor::new(self.0.bytes))
|
||||
.ok()
|
||||
// This enables using `?` on functions that return `Result<_, letterbox_server::Error>` to turn them into
|
||||
// `Result<_, AppError>`. That way you don't need to do that manually.
|
||||
impl<E> From<E> for AppError
|
||||
where
|
||||
E: Into<letterbox_server::ServerError>,
|
||||
{
|
||||
fn from(err: E) -> Self {
|
||||
Self(err.into())
|
||||
}
|
||||
}
|
||||
|
||||
struct DownloadAttachmentResponder(Attachment);
|
||||
|
||||
impl<'r, 'o: 'r> Responder<'r, 'o> for DownloadAttachmentResponder {
|
||||
fn respond_to(self, _: &'r Request<'_>) -> rocket::response::Result<'o> {
|
||||
let mut resp = Response::build();
|
||||
if let Some(filename) = self.0.filename {
|
||||
resp.header(Header::new(
|
||||
"Content-Disposition",
|
||||
format!(r#"attachment; filename="{}""#, filename),
|
||||
));
|
||||
}
|
||||
if let Some(content_type) = self.0.content_type {
|
||||
if let Some(ct) = ContentType::parse_flexible(&content_type) {
|
||||
resp.header(ct);
|
||||
}
|
||||
}
|
||||
resp.sized_body(self.0.bytes.len(), Cursor::new(self.0.bytes))
|
||||
.ok()
|
||||
fn inline_attachment_response(attachment: Attachment) -> impl IntoResponse {
|
||||
info!("attachment filename {:?}", attachment.filename);
|
||||
let mut hdr_map = headers::HeaderMap::new();
|
||||
if let Some(filename) = attachment.filename {
|
||||
hdr_map.insert(
|
||||
header::CONTENT_DISPOSITION,
|
||||
format!(r#"inline; filename="{}""#, filename)
|
||||
.parse()
|
||||
.unwrap(),
|
||||
);
|
||||
}
|
||||
if let Some(ct) = attachment.content_type {
|
||||
hdr_map.insert(header::CONTENT_TYPE, ct.parse().unwrap());
|
||||
}
|
||||
info!("hdr_map {hdr_map:?}");
|
||||
(hdr_map, attachment.bytes).into_response()
|
||||
}
|
||||
|
||||
#[get("/cid/<id>/<cid>")]
|
||||
async fn view_cid(
|
||||
nm: &State<Notmuch>,
|
||||
id: &str,
|
||||
cid: &str,
|
||||
) -> Result<InlineAttachmentResponder, Debug<ServerError>> {
|
||||
let mid = if id.starts_with("id:") {
|
||||
id.to_string()
|
||||
} else {
|
||||
format!("id:{}", id)
|
||||
};
|
||||
info!("view cid attachment {mid} {cid}");
|
||||
let attachment = cid_attachment_bytes(nm, &mid, &cid)?;
|
||||
Ok(InlineAttachmentResponder(attachment))
|
||||
fn download_attachment_response(attachment: Attachment) -> impl IntoResponse {
|
||||
info!("attachment filename {:?}", attachment.filename);
|
||||
let mut hdr_map = headers::HeaderMap::new();
|
||||
if let Some(filename) = attachment.filename {
|
||||
hdr_map.insert(
|
||||
header::CONTENT_DISPOSITION,
|
||||
format!(r#"attachment; filename="{}""#, filename)
|
||||
.parse()
|
||||
.unwrap(),
|
||||
);
|
||||
}
|
||||
if let Some(ct) = attachment.content_type {
|
||||
hdr_map.insert(header::CONTENT_TYPE, ct.parse().unwrap());
|
||||
}
|
||||
info!("hdr_map {hdr_map:?}");
|
||||
(hdr_map, attachment.bytes).into_response()
|
||||
}
|
||||
|
||||
#[get("/view/attachment/<id>/<idx>/<_>")]
|
||||
#[axum_macros::debug_handler]
|
||||
async fn view_attachment(
|
||||
nm: &State<Notmuch>,
|
||||
id: &str,
|
||||
idx: &str,
|
||||
) -> Result<InlineAttachmentResponder, Debug<ServerError>> {
|
||||
State(AppState { nm, .. }): State<AppState>,
|
||||
extract::Path((id, idx, _)): extract::Path<(String, String, String)>,
|
||||
) -> Result<impl IntoResponse, AppError> {
|
||||
let mid = if id.starts_with("id:") {
|
||||
id.to_string()
|
||||
} else {
|
||||
@@ -119,122 +106,239 @@ async fn view_attachment(
|
||||
.split('.')
|
||||
.map(|s| s.parse().expect("not a usize"))
|
||||
.collect();
|
||||
let attachment = attachment_bytes(nm, &mid, &idx)?;
|
||||
Ok(InlineAttachmentResponder(attachment))
|
||||
let attachment = attachment_bytes(&nm, &mid, &idx)?;
|
||||
Ok(inline_attachment_response(attachment))
|
||||
}
|
||||
|
||||
#[get("/download/attachment/<id>/<idx>/<_>")]
|
||||
async fn download_attachment(
|
||||
nm: &State<Notmuch>,
|
||||
id: &str,
|
||||
idx: &str,
|
||||
) -> Result<DownloadAttachmentResponder, Debug<ServerError>> {
|
||||
State(AppState { nm, .. }): State<AppState>,
|
||||
extract::Path((id, idx, _)): extract::Path<(String, String, String)>,
|
||||
) -> Result<impl IntoResponse, AppError> {
|
||||
let mid = if id.starts_with("id:") {
|
||||
id.to_string()
|
||||
} else {
|
||||
format!("id:{}", id)
|
||||
};
|
||||
info!("download attachment {mid} {idx}");
|
||||
info!("download attachment message id '{mid}' idx '{idx}'");
|
||||
let idx: Vec<_> = idx
|
||||
.split('.')
|
||||
.filter(|s| !s.is_empty())
|
||||
.map(|s| s.parse().expect("not a usize"))
|
||||
.collect();
|
||||
let attachment = attachment_bytes(nm, &mid, &idx)?;
|
||||
Ok(DownloadAttachmentResponder(attachment))
|
||||
let attachment = attachment_bytes(&nm, &mid, &idx)?;
|
||||
Ok(download_attachment_response(attachment))
|
||||
}
|
||||
|
||||
#[get("/original/<id>")]
|
||||
async fn original(
|
||||
nm: &State<Notmuch>,
|
||||
id: &str,
|
||||
) -> Result<(ContentType, Vec<u8>), Debug<NotmuchError>> {
|
||||
async fn view_cid(
|
||||
State(AppState { nm, .. }): State<AppState>,
|
||||
extract::Path((id, cid)): extract::Path<(String, String)>,
|
||||
) -> Result<impl IntoResponse, AppError> {
|
||||
let mid = if id.starts_with("id:") {
|
||||
id.to_string()
|
||||
} else {
|
||||
format!("id:{}", id)
|
||||
};
|
||||
let res = nm.show_original(&mid)?;
|
||||
Ok((ContentType::Plain, res))
|
||||
info!("view cid attachment {mid} {cid}");
|
||||
let attachment = cid_attachment_bytes(&nm, &mid, &cid)?;
|
||||
Ok(inline_attachment_response(attachment))
|
||||
}
|
||||
|
||||
#[rocket::get("/")]
|
||||
fn graphiql() -> content::RawHtml<String> {
|
||||
content::RawHtml(GraphiQLSource::build().endpoint("/api/graphql").finish())
|
||||
// TODO make this work with gitea message ids like `wathiede/letterbox/pulls/91@git.z.xinu.tv`
|
||||
async fn view_original(
|
||||
State(AppState { nm, .. }): State<AppState>,
|
||||
extract::Path(id): extract::Path<String>,
|
||||
) -> Result<impl IntoResponse, AppError> {
|
||||
info!("view_original {id}");
|
||||
let bytes = nm.show_original(&id)?;
|
||||
let s = String::from_utf8_lossy(&bytes).to_string();
|
||||
Ok(s.into_response())
|
||||
}
|
||||
|
||||
#[rocket::get("/graphql?<query..>")]
|
||||
async fn graphql_query(schema: &State<GraphqlSchema>, query: GraphQLQuery) -> GraphQLResponse {
|
||||
query.execute(schema.inner()).await
|
||||
async fn graphiql() -> impl IntoResponse {
|
||||
response::Html(
|
||||
GraphiQLSource::build()
|
||||
.endpoint("/api/graphql/")
|
||||
.subscription_endpoint("/api/graphql/ws")
|
||||
.finish(),
|
||||
)
|
||||
}
|
||||
|
||||
#[rocket::post("/graphql", data = "<request>", format = "application/json")]
|
||||
async fn graphql_request(
|
||||
schema: &State<GraphqlSchema>,
|
||||
request: GraphQLRequest,
|
||||
) -> GraphQLResponse {
|
||||
request.execute(schema.inner()).await
|
||||
async fn start_ws(
|
||||
ws: WebSocketUpgrade,
|
||||
ConnectInfo(addr): ConnectInfo<SocketAddr>,
|
||||
State(AppState {
|
||||
connection_tracker, ..
|
||||
}): State<AppState>,
|
||||
) -> impl IntoResponse {
|
||||
info!("intiating websocket connection for {addr}");
|
||||
ws.on_upgrade(async move |socket| connection_tracker.lock().await.add_peer(socket, addr).await)
|
||||
}
|
||||
|
||||
#[rocket::main]
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct NotificationParams {
|
||||
delay_ms: Option<u64>,
|
||||
num_unprocessed: Option<usize>,
|
||||
}
|
||||
|
||||
async fn send_refresh_websocket_handler(
|
||||
State(AppState {
|
||||
nm,
|
||||
pool,
|
||||
connection_tracker,
|
||||
..
|
||||
}): State<AppState>,
|
||||
params: Query<NotificationParams>,
|
||||
) -> impl IntoResponse {
|
||||
info!("send_refresh_websocket_handler params {params:?}");
|
||||
if let Some(delay_ms) = params.delay_ms {
|
||||
let delay = Duration::from_millis(delay_ms);
|
||||
info!("sleeping {delay:?}");
|
||||
tokio::time::sleep(delay).await;
|
||||
}
|
||||
let limit = match params.num_unprocessed {
|
||||
Some(0) => None,
|
||||
Some(limit) => Some(limit),
|
||||
None => Some(10),
|
||||
};
|
||||
|
||||
let mut ids = None;
|
||||
match label_unprocessed(&nm, &pool, false, limit, "tag:unprocessed").await {
|
||||
Ok(i) => ids = Some(i),
|
||||
Err(err) => error!("Failed to label_unprocessed: {err:?}"),
|
||||
};
|
||||
connection_tracker
|
||||
.lock()
|
||||
.await
|
||||
.send_message_all(WebsocketMessage::RefreshMessages)
|
||||
.await;
|
||||
if let Some(ids) = ids {
|
||||
format!("{ids:?}")
|
||||
} else {
|
||||
"refresh triggered".to_string()
|
||||
}
|
||||
}
|
||||
|
||||
async fn watch_new(
|
||||
nm: Notmuch,
|
||||
pool: PgPool,
|
||||
conn_tracker: Arc<Mutex<ConnectionTracker>>,
|
||||
poll_time: Duration,
|
||||
) -> Result<(), async_graphql::Error> {
|
||||
async fn watch_new_iteration(
|
||||
nm: &Notmuch,
|
||||
pool: &PgPool,
|
||||
conn_tracker: Arc<Mutex<ConnectionTracker>>,
|
||||
old_ids: &[String],
|
||||
) -> Result<Vec<String>, async_graphql::Error> {
|
||||
let ids = compute_catchup_ids(&nm, &pool, "is:unread").await?;
|
||||
info!("old_ids: {} ids: {}", old_ids.len(), ids.len());
|
||||
if old_ids != ids {
|
||||
label_unprocessed(&nm, &pool, false, Some(100), "tag:unprocessed").await?;
|
||||
conn_tracker
|
||||
.lock()
|
||||
.await
|
||||
.send_message_all(WebsocketMessage::RefreshMessages)
|
||||
.await
|
||||
}
|
||||
Ok(ids)
|
||||
}
|
||||
let mut old_ids = Vec::new();
|
||||
loop {
|
||||
old_ids = match watch_new_iteration(&nm, &pool, conn_tracker.clone(), &old_ids).await {
|
||||
Ok(old_ids) => old_ids,
|
||||
Err(err) => {
|
||||
error!("watch_new_iteration failed: {err:?}");
|
||||
continue;
|
||||
}
|
||||
};
|
||||
tokio::time::sleep(poll_time).await;
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
struct AppState {
|
||||
nm: Notmuch,
|
||||
pool: PgPool,
|
||||
connection_tracker: Arc<Mutex<ConnectionTracker>>,
|
||||
}
|
||||
|
||||
#[derive(Parser)]
|
||||
#[command(version, about, long_about = None)]
|
||||
struct Cli {
|
||||
#[arg(short, long, default_value = "0.0.0.0:9345")]
|
||||
addr: SocketAddr,
|
||||
newsreader_database_url: String,
|
||||
newsreader_tantivy_db_path: String,
|
||||
slurp_cache_path: String,
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<(), Box<dyn Error>> {
|
||||
let cli = Cli::parse();
|
||||
let _guard = xtracing::init(env!("CARGO_BIN_NAME"))?;
|
||||
build_info::build_info!(fn bi);
|
||||
info!("Build Info: {}", letterbox_shared::build_version(bi));
|
||||
let allowed_origins = AllowedOrigins::all();
|
||||
let cors = rocket_cors::CorsOptions {
|
||||
allowed_origins,
|
||||
allowed_methods: vec!["Get"]
|
||||
.into_iter()
|
||||
.map(|s| FromStr::from_str(s).unwrap())
|
||||
.collect(),
|
||||
allowed_headers: AllowedHeaders::some(&["Authorization", "Accept"]),
|
||||
allow_credentials: true,
|
||||
..Default::default()
|
||||
if !std::fs::exists(&cli.slurp_cache_path)? {
|
||||
info!("Creating slurp cache @ '{}'", &cli.slurp_cache_path);
|
||||
std::fs::create_dir_all(&cli.slurp_cache_path)?;
|
||||
}
|
||||
.to_cors()?;
|
||||
|
||||
let rkt = rocket::build()
|
||||
.mount(
|
||||
letterbox_shared::urls::MOUNT_POINT,
|
||||
routes![
|
||||
original,
|
||||
show_pretty,
|
||||
show,
|
||||
graphql_query,
|
||||
graphql_request,
|
||||
graphiql,
|
||||
view_cid,
|
||||
view_attachment,
|
||||
download_attachment,
|
||||
],
|
||||
)
|
||||
.attach(cors)
|
||||
.attach(AdHoc::config::<Config>());
|
||||
|
||||
let config: Config = rkt.figment().extract()?;
|
||||
if !std::fs::exists(&config.slurp_cache_path)? {
|
||||
info!("Creating slurp cache @ '{}'", &config.slurp_cache_path);
|
||||
std::fs::create_dir_all(&config.slurp_cache_path)?;
|
||||
}
|
||||
let pool = PgPool::connect(&config.newsreader_database_url).await?;
|
||||
let pool = PgPool::connect(&cli.newsreader_database_url).await?;
|
||||
let nm = Notmuch::default();
|
||||
sqlx::migrate!("./migrations").run(&pool).await?;
|
||||
#[cfg(feature = "tantivy")]
|
||||
let tantivy_conn = TantivyConnection::new(&config.newsreader_tantivy_db_path)?;
|
||||
let tantivy_conn = TantivyConnection::new(&cli.newsreader_tantivy_db_path)?;
|
||||
|
||||
let cacher = FilesystemCacher::new(&config.slurp_cache_path)?;
|
||||
let schema = Schema::build(QueryRoot, Mutation, EmptySubscription)
|
||||
.data(Notmuch::default())
|
||||
let cacher = FilesystemCacher::new(&cli.slurp_cache_path)?;
|
||||
let schema = Schema::build(QueryRoot, MutationRoot, SubscriptionRoot)
|
||||
.data(nm.clone())
|
||||
.data(cacher)
|
||||
.data(pool.clone());
|
||||
|
||||
#[cfg(feature = "tantivy")]
|
||||
let schema = schema.data(tantivy_conn);
|
||||
|
||||
let schema = schema.extension(extensions::Logger).finish();
|
||||
|
||||
let rkt = rkt.manage(schema).manage(pool).manage(Notmuch::default());
|
||||
//.manage(Notmuch::with_config("../notmuch/testdata/notmuch.config"))
|
||||
let connection_tracker = Arc::new(Mutex::new(ConnectionTracker::default()));
|
||||
let ct = Arc::clone(&connection_tracker);
|
||||
let poll_time = Duration::from_secs(60);
|
||||
let _h = tokio::spawn(watch_new(nm.clone(), pool.clone(), ct, poll_time));
|
||||
|
||||
rkt.launch().await?;
|
||||
let api_routes = Router::new()
|
||||
.route(
|
||||
"/download/attachment/{id}/{idx}/{*rest}",
|
||||
get(download_attachment),
|
||||
)
|
||||
.route("/view/attachment/{id}/{idx}/{*rest}", get(view_attachment))
|
||||
.route("/original/{id}", get(view_original))
|
||||
.route("/cid/{id}/{cid}", get(view_cid))
|
||||
.route("/ws", any(start_ws))
|
||||
.route_service("/graphql/ws", GraphQLSubscription::new(schema.clone()))
|
||||
.route(
|
||||
"/graphql/",
|
||||
get(graphiql).post_service(GraphQL::new(schema.clone())),
|
||||
);
|
||||
|
||||
let notification_routes = Router::new()
|
||||
.route("/mail", post(send_refresh_websocket_handler))
|
||||
.route("/news", post(send_refresh_websocket_handler));
|
||||
let app = Router::new()
|
||||
.nest("/api", api_routes)
|
||||
.nest("/notification", notification_routes)
|
||||
.with_state(AppState {
|
||||
nm,
|
||||
pool,
|
||||
connection_tracker,
|
||||
})
|
||||
.layer(
|
||||
TraceLayer::new_for_http()
|
||||
.make_span_with(DefaultMakeSpan::default().include_headers(true)),
|
||||
);
|
||||
|
||||
let listener = TcpListener::bind(cli.addr).await.unwrap();
|
||||
tracing::info!("listening on {}", listener.local_addr().unwrap());
|
||||
axum::serve(
|
||||
listener,
|
||||
app.into_make_service_with_connect_info::<SocketAddr>(),
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
39
server/src/bin/test-labeling.rs
Normal file
39
server/src/bin/test-labeling.rs
Normal file
@@ -0,0 +1,39 @@
|
||||
use std::error::Error;
|
||||
|
||||
use clap::Parser;
|
||||
use letterbox_notmuch::Notmuch;
|
||||
use letterbox_server::nm::label_unprocessed;
|
||||
use sqlx::postgres::PgPool;
|
||||
use tracing::info;
|
||||
|
||||
#[derive(Parser)]
|
||||
#[command(version, about, long_about = None)]
|
||||
struct Cli {
|
||||
#[arg(short, long)]
|
||||
newsreader_database_url: String,
|
||||
#[arg(short, long, default_value = "10")]
|
||||
/// Set to 0 to process all matches
|
||||
messages_to_process: usize,
|
||||
#[arg(short, long, default_value = "false")]
|
||||
execute: bool,
|
||||
/// Process messages matching this notmuch query
|
||||
#[arg(short, long, default_value = "tag:unprocessed")]
|
||||
query: String,
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<(), Box<dyn Error>> {
|
||||
let cli = Cli::parse();
|
||||
let _guard = xtracing::init(env!("CARGO_BIN_NAME"))?;
|
||||
build_info::build_info!(fn bi);
|
||||
info!("Build Info: {}", letterbox_shared::build_version(bi));
|
||||
let pool = PgPool::connect(&cli.newsreader_database_url).await?;
|
||||
let nm = Notmuch::default();
|
||||
let limit = if cli.messages_to_process > 0 {
|
||||
Some(cli.messages_to_process)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
label_unprocessed(&nm, &pool, !cli.execute, limit, &cli.query).await?;
|
||||
Ok(())
|
||||
}
|
||||
2719
server/src/email_extract.rs
Normal file
2719
server/src/email_extract.rs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -39,4 +39,12 @@ pub enum ServerError {
|
||||
QueryParseError(#[from] QueryParserError),
|
||||
#[error("impossible: {0}")]
|
||||
InfaillibleError(#[from] Infallible),
|
||||
#[error("askama error: {0}")]
|
||||
AskamaError(#[from] askama::Error),
|
||||
#[error("xml error: {0}")]
|
||||
XmlError(#[from] quick_xml::Error),
|
||||
#[error("xml encoding error: {0}")]
|
||||
XmlEncodingError(#[from] quick_xml::encoding::EncodingError),
|
||||
#[error("html to text error: {0}")]
|
||||
Html2TextError(#[from] html2text::Error),
|
||||
}
|
||||
|
||||
@@ -2,20 +2,22 @@ use std::{fmt, str::FromStr};
|
||||
|
||||
use async_graphql::{
|
||||
connection::{self, Connection, Edge, OpaqueCursor},
|
||||
Context, EmptySubscription, Enum, Error, FieldResult, InputObject, Object, Schema,
|
||||
SimpleObject, Union,
|
||||
futures_util::Stream,
|
||||
Context, Enum, Error, FieldResult, InputObject, Object, Schema, SimpleObject, Subscription,
|
||||
Union,
|
||||
};
|
||||
use cacher::FilesystemCacher;
|
||||
use chrono::{DateTime, Utc};
|
||||
use futures::stream;
|
||||
use letterbox_notmuch::Notmuch;
|
||||
use log::info;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use sqlx::postgres::PgPool;
|
||||
use tokio::join;
|
||||
use tracing::instrument;
|
||||
use tracing::{info, instrument};
|
||||
|
||||
#[cfg(feature = "tantivy")]
|
||||
use crate::tantivy::TantivyConnection;
|
||||
use crate::{newsreader, nm, Query};
|
||||
use crate::{newsreader, nm, nm::label_unprocessed, Query};
|
||||
|
||||
/// # Number of seconds since the Epoch
|
||||
pub type UnixTime = isize;
|
||||
@@ -236,6 +238,24 @@ impl Body {
|
||||
content_tree: "".to_string(),
|
||||
})
|
||||
}
|
||||
|
||||
pub fn to_html(&self) -> Option<String> {
|
||||
match self {
|
||||
Body::Html(h) => Some(h.html.clone()),
|
||||
Body::PlainText(p) => Some(format!("<pre>{}</pre>", html_escape::encode_text(&p.text))),
|
||||
Body::UnhandledContentType(u) => {
|
||||
Some(format!("<pre>{}</pre>", html_escape::encode_text(&u.text)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn to_html_content_tree(&self) -> Option<String> {
|
||||
match self {
|
||||
Body::Html(h) => Some(h.content_tree.clone()),
|
||||
Body::PlainText(p) => Some(p.content_tree.clone()),
|
||||
Body::UnhandledContentType(u) => Some(u.content_tree.clone()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, SimpleObject)]
|
||||
@@ -289,7 +309,6 @@ impl QueryRoot {
|
||||
build_info::build_info!(fn bi);
|
||||
Ok(letterbox_shared::build_version(bi))
|
||||
}
|
||||
#[instrument(skip_all, fields(query=query))]
|
||||
#[instrument(skip_all, fields(query=query, rid=request_id()))]
|
||||
async fn count<'ctx>(&self, ctx: &Context<'ctx>, query: String) -> Result<usize, Error> {
|
||||
let nm = ctx.data_unchecked::<Notmuch>();
|
||||
@@ -310,6 +329,7 @@ impl QueryRoot {
|
||||
info!("count {newsreader_query:?} newsreader count {newsreader_count} notmuch count {notmuch_count} tantivy count {tantivy_count} total {total}");
|
||||
Ok(total)
|
||||
}
|
||||
#[instrument(skip_all, fields(query=query, rid=request_id()))]
|
||||
async fn catchup<'ctx>(
|
||||
&self,
|
||||
ctx: &Context<'ctx>,
|
||||
@@ -317,37 +337,7 @@ impl QueryRoot {
|
||||
) -> Result<Vec<String>, Error> {
|
||||
let nm = ctx.data_unchecked::<Notmuch>();
|
||||
let pool = ctx.data_unchecked::<PgPool>();
|
||||
let query: Query = query.parse()?;
|
||||
// TODO: implement optimized versions of fetching just IDs
|
||||
let newsreader_fut = newsreader_search(pool, None, None, None, None, &query);
|
||||
let notmuch_fut = notmuch_search(nm, None, None, None, None, &query);
|
||||
let (newsreader_results, notmuch_results) = join!(newsreader_fut, notmuch_fut);
|
||||
|
||||
let newsreader_results = newsreader_results?;
|
||||
let notmuch_results = notmuch_results?;
|
||||
info!(
|
||||
"newsreader_results ({}) notmuch_results ({})",
|
||||
newsreader_results.len(),
|
||||
notmuch_results.len(),
|
||||
);
|
||||
|
||||
let mut results: Vec<_> = newsreader_results
|
||||
.into_iter()
|
||||
.chain(notmuch_results)
|
||||
.collect();
|
||||
// The leading '-' is to reverse sort
|
||||
results.sort_by_key(|item| match item {
|
||||
ThreadSummaryCursor::Newsreader(_, ts) => -ts.timestamp,
|
||||
ThreadSummaryCursor::Notmuch(_, ts) => -ts.timestamp,
|
||||
});
|
||||
let ids = results
|
||||
.into_iter()
|
||||
.map(|r| match r {
|
||||
ThreadSummaryCursor::Newsreader(_, ts) => ts.thread,
|
||||
ThreadSummaryCursor::Notmuch(_, ts) => ts.thread,
|
||||
})
|
||||
.collect();
|
||||
Ok(ids)
|
||||
compute_catchup_ids(nm, pool, &query).await
|
||||
}
|
||||
|
||||
// TODO: this function doesn't get parallelism, possibly because notmuch is sync and blocks,
|
||||
@@ -593,9 +583,9 @@ async fn tantivy_search(
|
||||
.collect())
|
||||
}
|
||||
|
||||
pub struct Mutation;
|
||||
pub struct MutationRoot;
|
||||
#[Object]
|
||||
impl Mutation {
|
||||
impl MutationRoot {
|
||||
#[instrument(skip_all, fields(query=query, unread=unread, rid=request_id()))]
|
||||
async fn set_read_status<'ctx>(
|
||||
&self,
|
||||
@@ -639,6 +629,42 @@ impl Mutation {
|
||||
nm.tag_remove(&tag, &query)?;
|
||||
Ok(true)
|
||||
}
|
||||
#[instrument(skip_all, fields(query=query, wake_time=wake_time.to_string(), rid=request_id()))]
|
||||
async fn snooze<'ctx>(
|
||||
&self,
|
||||
ctx: &Context<'ctx>,
|
||||
query: String,
|
||||
wake_time: DateTime<Utc>,
|
||||
) -> Result<bool, Error> {
|
||||
info!("TODO snooze {query} until {wake_time})");
|
||||
let pool = ctx.data_unchecked::<PgPool>();
|
||||
sqlx::query!(
|
||||
r#"
|
||||
INSERT INTO snooze (message_id, wake)
|
||||
VALUES ($1, $2)
|
||||
ON CONFLICT (message_id) DO UPDATE
|
||||
SET wake = $2
|
||||
"#,
|
||||
query,
|
||||
wake_time
|
||||
)
|
||||
.execute(pool)
|
||||
.await?;
|
||||
|
||||
let nm = ctx.data_unchecked::<Notmuch>();
|
||||
let pool = ctx.data_unchecked::<PgPool>();
|
||||
#[cfg(feature = "tantivy")]
|
||||
let tantivy = ctx.data_unchecked::<TantivyConnection>();
|
||||
|
||||
let unread = false;
|
||||
let query: Query = query.parse()?;
|
||||
newsreader::set_read_status(pool, &query, unread).await?;
|
||||
#[cfg(feature = "tantivy")]
|
||||
tantivy.reindex_thread(pool, &query).await?;
|
||||
nm::set_read_status(nm, &query, unread).await?;
|
||||
|
||||
Ok(true)
|
||||
}
|
||||
/// Drop and recreate tantivy index. Warning this is slow
|
||||
#[cfg(feature = "tantivy")]
|
||||
async fn drop_and_load_index<'ctx>(&self, ctx: &Context<'ctx>) -> Result<bool, Error> {
|
||||
@@ -650,6 +676,18 @@ impl Mutation {
|
||||
|
||||
Ok(true)
|
||||
}
|
||||
#[instrument(skip_all, fields(rid=request_id()))]
|
||||
async fn label_unprocessed<'ctx>(
|
||||
&self,
|
||||
ctx: &Context<'ctx>,
|
||||
limit: Option<usize>,
|
||||
) -> Result<bool, Error> {
|
||||
let nm = ctx.data_unchecked::<Notmuch>();
|
||||
let pool = ctx.data_unchecked::<PgPool>();
|
||||
label_unprocessed(&nm, &pool, false, limit, "tag:unprocessed").await?;
|
||||
Ok(true)
|
||||
}
|
||||
|
||||
#[instrument(skip_all, fields(rid=request_id()))]
|
||||
async fn refresh<'ctx>(&self, ctx: &Context<'ctx>) -> Result<bool, Error> {
|
||||
let nm = ctx.data_unchecked::<Notmuch>();
|
||||
@@ -657,6 +695,13 @@ impl Mutation {
|
||||
let pool = ctx.data_unchecked::<PgPool>();
|
||||
info!("{}", String::from_utf8_lossy(&nm.new()?));
|
||||
newsreader::refresh(pool, cacher).await?;
|
||||
|
||||
// Process email labels
|
||||
label_unprocessed(&nm, &pool, false, Some(1000), "tag:unprocessed").await?;
|
||||
|
||||
// Look for snoozed messages and mark unread
|
||||
wakeup(&nm, &pool).await?;
|
||||
|
||||
#[cfg(feature = "tantivy")]
|
||||
{
|
||||
let tantivy = ctx.data_unchecked::<TantivyConnection>();
|
||||
@@ -667,4 +712,78 @@ impl Mutation {
|
||||
}
|
||||
}
|
||||
|
||||
pub type GraphqlSchema = Schema<QueryRoot, Mutation, EmptySubscription>;
|
||||
pub struct SubscriptionRoot;
|
||||
#[Subscription]
|
||||
impl SubscriptionRoot {
|
||||
async fn values(&self, _ctx: &Context<'_>) -> Result<impl Stream<Item = usize>, Error> {
|
||||
Ok(stream::iter(0..10))
|
||||
}
|
||||
}
|
||||
|
||||
pub type GraphqlSchema = Schema<QueryRoot, MutationRoot, SubscriptionRoot>;
|
||||
|
||||
#[instrument(name = "wakeup", skip_all)]
|
||||
pub async fn wakeup(nm: &Notmuch, pool: &PgPool) -> Result<(), Error> {
|
||||
for row in sqlx::query!(
|
||||
r#"
|
||||
SELECT id, message_id
|
||||
FROM snooze
|
||||
WHERE wake < NOW();
|
||||
"#
|
||||
)
|
||||
.fetch_all(pool)
|
||||
.await?
|
||||
{
|
||||
let query: Query = row.message_id.parse()?;
|
||||
info!("need to wake {query}");
|
||||
let unread = true;
|
||||
newsreader::set_read_status(pool, &query, unread).await?;
|
||||
#[cfg(feature = "tantivy")]
|
||||
tantivy.reindex_thread(pool, &query).await?;
|
||||
nm::set_read_status(nm, &query, unread).await?;
|
||||
|
||||
sqlx::query!("DELETE FROM snooze WHERE id = $1", row.id)
|
||||
.execute(pool)
|
||||
.await?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[instrument(skip_all, fields(query=query))]
|
||||
pub async fn compute_catchup_ids(
|
||||
nm: &Notmuch,
|
||||
pool: &PgPool,
|
||||
query: &str,
|
||||
) -> Result<Vec<String>, Error> {
|
||||
let query: Query = query.parse()?;
|
||||
// TODO: implement optimized versions of fetching just IDs
|
||||
let newsreader_fut = newsreader_search(pool, None, None, None, None, &query);
|
||||
let notmuch_fut = notmuch_search(nm, None, None, None, None, &query);
|
||||
let (newsreader_results, notmuch_results) = join!(newsreader_fut, notmuch_fut);
|
||||
|
||||
let newsreader_results = newsreader_results?;
|
||||
let notmuch_results = notmuch_results?;
|
||||
info!(
|
||||
"newsreader_results ({}) notmuch_results ({})",
|
||||
newsreader_results.len(),
|
||||
notmuch_results.len(),
|
||||
);
|
||||
|
||||
let mut results: Vec<_> = newsreader_results
|
||||
.into_iter()
|
||||
.chain(notmuch_results)
|
||||
.collect();
|
||||
// The leading '-' is to reverse sort
|
||||
results.sort_by_key(|item| match item {
|
||||
ThreadSummaryCursor::Newsreader(_, ts) => -ts.timestamp,
|
||||
ThreadSummaryCursor::Notmuch(_, ts) => -ts.timestamp,
|
||||
});
|
||||
let ids = results
|
||||
.into_iter()
|
||||
.map(|r| match r {
|
||||
ThreadSummaryCursor::Newsreader(_, ts) => ts.thread,
|
||||
ThreadSummaryCursor::Notmuch(_, ts) => ts.thread,
|
||||
})
|
||||
.collect();
|
||||
Ok(ids)
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
pub mod config;
|
||||
pub mod email_extract;
|
||||
pub mod error;
|
||||
pub mod graphql;
|
||||
pub mod mail;
|
||||
pub mod newsreader;
|
||||
pub mod nm;
|
||||
pub mod ws;
|
||||
|
||||
#[cfg(feature = "tantivy")]
|
||||
pub mod tantivy;
|
||||
|
||||
@@ -17,9 +19,10 @@ use std::{
|
||||
|
||||
use async_trait::async_trait;
|
||||
use cacher::{Cacher, FilesystemCacher};
|
||||
use chrono::NaiveDateTime;
|
||||
use css_inline::{CSSInliner, InlineError, InlineOptions};
|
||||
pub use error::ServerError;
|
||||
use linkify::{LinkFinder, LinkKind};
|
||||
use log::{debug, error, info, warn};
|
||||
use lol_html::{
|
||||
element, errors::RewritingError, html_content::ContentType, rewrite_str, text,
|
||||
RewriteStrSettings,
|
||||
@@ -28,12 +31,11 @@ use maplit::{hashmap, hashset};
|
||||
use regex::Regex;
|
||||
use reqwest::StatusCode;
|
||||
use scraper::{Html, Selector};
|
||||
use sqlx::types::time::PrimitiveDateTime;
|
||||
use thiserror::Error;
|
||||
use tracing::{debug, error, info, warn};
|
||||
use url::Url;
|
||||
|
||||
use crate::{
|
||||
error::ServerError,
|
||||
graphql::{Corpus, ThreadSummary},
|
||||
newsreader::is_newsreader_thread,
|
||||
nm::is_notmuch_thread_or_id,
|
||||
@@ -42,6 +44,8 @@ use crate::{
|
||||
const NEWSREADER_TAG_PREFIX: &'static str = "News/";
|
||||
const NEWSREADER_THREAD_PREFIX: &'static str = "news:";
|
||||
|
||||
const USER_AGENT: &'static str = "letterbox news reader (letterbox-ua@xinu.tv)";
|
||||
|
||||
// TODO: figure out how to use Cow
|
||||
#[async_trait]
|
||||
trait Transformer: Send + Sync {
|
||||
@@ -316,7 +320,8 @@ impl<'c> Transformer for SlurpContents<'c> {
|
||||
let body = if let Some(body) = cacher.get(link.as_str()) {
|
||||
String::from_utf8_lossy(&body).to_string()
|
||||
} else {
|
||||
let resp = reqwest::get(link.as_str()).await?;
|
||||
let client = reqwest::Client::builder().user_agent(USER_AGENT).build()?;
|
||||
let resp = client.get(link.as_str()).send().await?;
|
||||
let status = resp.status();
|
||||
if status.is_server_error() {
|
||||
error!("status error for {link}: {status}");
|
||||
@@ -441,6 +446,34 @@ pub fn sanitize_html(
|
||||
}
|
||||
};
|
||||
let mut element_content_handlers = vec![
|
||||
// Remove width and height attributes on elements
|
||||
element!("[width],[height]", |el| {
|
||||
el.remove_attribute("width");
|
||||
el.remove_attribute("height");
|
||||
Ok(())
|
||||
}),
|
||||
// Remove width and height values from inline styles
|
||||
element!("[style]", |el| {
|
||||
let style = el.get_attribute("style").unwrap();
|
||||
let style = style
|
||||
.split(";")
|
||||
.filter(|s| {
|
||||
let Some((k, _)) = s.split_once(':') else {
|
||||
return true;
|
||||
};
|
||||
match k {
|
||||
"width" | "max-width" | "min-width" | "height" | "max-height"
|
||||
| "min-height" => false,
|
||||
_ => true,
|
||||
}
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
.join(";");
|
||||
if let Err(e) = el.set_attribute("style", &style) {
|
||||
error!("Failed to set style attribute: {e}");
|
||||
}
|
||||
Ok(())
|
||||
}),
|
||||
// Open links in new tab
|
||||
element!("a[href]", |el| {
|
||||
el.set_attribute("target", "_blank").unwrap();
|
||||
@@ -724,6 +757,7 @@ pub struct Query {
|
||||
pub is_notmuch: bool,
|
||||
pub is_newsreader: bool,
|
||||
pub is_tantivy: bool,
|
||||
pub is_snoozed: bool,
|
||||
pub corpus: Option<Corpus>,
|
||||
}
|
||||
|
||||
@@ -747,6 +781,9 @@ impl fmt::Display for Query {
|
||||
if self.is_newsreader {
|
||||
write!(f, "is:news ")?;
|
||||
}
|
||||
if self.is_snoozed {
|
||||
write!(f, "is:snoozed ")?;
|
||||
}
|
||||
match self.corpus {
|
||||
Some(c) => write!(f, "corpus:{c:?}")?,
|
||||
_ => (),
|
||||
@@ -803,6 +840,7 @@ impl FromStr for Query {
|
||||
let mut is_notmuch = false;
|
||||
let mut is_newsreader = false;
|
||||
let mut is_tantivy = false;
|
||||
let mut is_snoozed = false;
|
||||
let mut corpus = None;
|
||||
for word in s.split_whitespace() {
|
||||
if word == "is:unread" {
|
||||
@@ -842,6 +880,8 @@ impl FromStr for Query {
|
||||
is_newsreader = true;
|
||||
} else if word == "is:newsreader" {
|
||||
is_newsreader = true;
|
||||
} else if word == "is:snoozed" {
|
||||
is_snoozed = true;
|
||||
} else {
|
||||
remainder.push(word.to_string());
|
||||
}
|
||||
@@ -860,13 +900,14 @@ impl FromStr for Query {
|
||||
is_notmuch,
|
||||
is_newsreader,
|
||||
is_tantivy,
|
||||
is_snoozed,
|
||||
corpus,
|
||||
})
|
||||
}
|
||||
}
|
||||
pub struct ThreadSummaryRecord {
|
||||
pub site: Option<String>,
|
||||
pub date: Option<PrimitiveDateTime>,
|
||||
pub date: Option<NaiveDateTime>,
|
||||
pub is_read: Option<bool>,
|
||||
pub title: Option<String>,
|
||||
pub uid: String,
|
||||
@@ -884,11 +925,7 @@ async fn thread_summary_from_row(r: ThreadSummaryRecord) -> ThreadSummary {
|
||||
title = clean_title(&title).await.expect("failed to clean title");
|
||||
ThreadSummary {
|
||||
thread: format!("{NEWSREADER_THREAD_PREFIX}{}", r.uid),
|
||||
timestamp: r
|
||||
.date
|
||||
.expect("post missing date")
|
||||
.assume_utc()
|
||||
.unix_timestamp() as isize,
|
||||
timestamp: r.date.expect("post missing date").and_utc().timestamp() as isize,
|
||||
date_relative: format!("{:?}", r.date),
|
||||
//date_relative: "TODO date_relative".to_string(),
|
||||
matched: 0,
|
||||
@@ -913,3 +950,21 @@ async fn clean_title(title: &str) -> Result<String, ServerError> {
|
||||
}
|
||||
Ok(title)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::{SanitizeHtml, Transformer};
|
||||
|
||||
#[tokio::test]
|
||||
async fn strip_sizes() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let ss = SanitizeHtml {
|
||||
cid_prefix: "",
|
||||
base_url: &None,
|
||||
};
|
||||
let input = r#"<p width=16 height=16 style="color:blue;width:16px;height:16px;">This el has width and height attributes and inline styles</p>"#;
|
||||
let want = r#"<p style="color:blue;">This el has width and height attributes and inline styles</p>"#;
|
||||
let got = ss.transform(&None, input).await?;
|
||||
assert_eq!(got, want);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,113 +0,0 @@
|
||||
use std::{fs::File, io::Read};
|
||||
|
||||
use mailparse::{
|
||||
addrparse_header, dateparse, parse_mail, MailHeaderMap, MailParseError, ParsedMail,
|
||||
};
|
||||
use sqlx::postgres::PgPool;
|
||||
use thiserror::Error;
|
||||
use tracing::info;
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
pub enum MailError {
|
||||
#[error("missing from header")]
|
||||
MissingFrom,
|
||||
#[error("missing from header display name")]
|
||||
MissingFromDisplayName,
|
||||
#[error("missing subject header")]
|
||||
MissingSubject,
|
||||
#[error("missing html part")]
|
||||
MissingHtmlPart,
|
||||
#[error("missing message ID")]
|
||||
MissingMessageId,
|
||||
#[error("missing date")]
|
||||
MissingDate,
|
||||
#[error("DB error {0}")]
|
||||
SqlxError(#[from] sqlx::Error),
|
||||
#[error("IO error {0}")]
|
||||
IOError(#[from] std::io::Error),
|
||||
#[error("mail parse error {0}")]
|
||||
MailParseError(#[from] MailParseError),
|
||||
}
|
||||
|
||||
pub async fn read_mail_to_db(pool: &PgPool, path: &str) -> Result<(), MailError> {
|
||||
let mut file = File::open(path)?;
|
||||
let mut buffer = Vec::new();
|
||||
file.read_to_end(&mut buffer)?;
|
||||
let m = parse_mail(&buffer)?;
|
||||
|
||||
let subject = m
|
||||
.headers
|
||||
.get_first_value("subject")
|
||||
.ok_or(MailError::MissingSubject)?;
|
||||
|
||||
let from = addrparse_header(
|
||||
m.headers
|
||||
.get_first_header("from")
|
||||
.ok_or(MailError::MissingFrom)?,
|
||||
)?;
|
||||
let from = from.extract_single_info().ok_or(MailError::MissingFrom)?;
|
||||
let name = from.display_name.ok_or(MailError::MissingFromDisplayName)?;
|
||||
let slug = name.to_lowercase().replace(' ', "-");
|
||||
let url = from.addr;
|
||||
let message_id = m
|
||||
.headers
|
||||
.get_first_value("Message-ID")
|
||||
.ok_or(MailError::MissingMessageId)?;
|
||||
let uid = &message_id;
|
||||
let feed_id = find_feed(&pool, &name, &slug, &url).await?;
|
||||
let date = dateparse(
|
||||
&m.headers
|
||||
.get_first_value("Date")
|
||||
.ok_or(MailError::MissingDate)?,
|
||||
)?;
|
||||
|
||||
println!("Feed: {feed_id} Subject: {}", subject);
|
||||
|
||||
if let Some(_m) = first_html(&m) {
|
||||
info!("add email {slug} {subject} {message_id} {date} {uid} {url}");
|
||||
} else {
|
||||
return Err(MailError::MissingHtmlPart.into());
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
fn first_html<'m>(m: &'m ParsedMail<'m>) -> Option<&'m ParsedMail<'m>> {
|
||||
for ele in m.parts() {
|
||||
if ele.ctype.mimetype == "text/html" {
|
||||
return Some(ele);
|
||||
}
|
||||
}
|
||||
None
|
||||
}
|
||||
async fn find_feed(pool: &PgPool, name: &str, slug: &str, url: &str) -> Result<i32, MailError> {
|
||||
match sqlx::query!(
|
||||
r#"
|
||||
SELECT id
|
||||
FROM feed
|
||||
WHERE slug = $1
|
||||
"#,
|
||||
slug
|
||||
)
|
||||
.fetch_one(pool)
|
||||
.await
|
||||
{
|
||||
Err(sqlx::Error::RowNotFound) => {
|
||||
let rec = sqlx::query!(
|
||||
r#"
|
||||
INSERT INTO feed ( name, slug, url, homepage, selector )
|
||||
VALUES ( $1, $2, $3, '', '' )
|
||||
RETURNING id
|
||||
"#,
|
||||
name,
|
||||
slug,
|
||||
url
|
||||
)
|
||||
.fetch_one(pool)
|
||||
.await?;
|
||||
|
||||
return Ok(rec.id);
|
||||
}
|
||||
Ok(rec) => return Ok(rec.id),
|
||||
Err(e) => return Err(e.into()),
|
||||
};
|
||||
}
|
||||
@@ -3,11 +3,10 @@ use std::collections::HashMap;
|
||||
use cacher::FilesystemCacher;
|
||||
use futures::{stream::FuturesUnordered, StreamExt};
|
||||
use letterbox_shared::compute_color;
|
||||
use log::{error, info};
|
||||
use maplit::hashmap;
|
||||
use scraper::Selector;
|
||||
use sqlx::postgres::PgPool;
|
||||
use tracing::instrument;
|
||||
use tracing::{error, info, instrument, warn};
|
||||
use url::Url;
|
||||
|
||||
use crate::{
|
||||
@@ -87,6 +86,10 @@ pub async fn search(
|
||||
query: &Query,
|
||||
) -> Result<Vec<(i32, ThreadSummary)>, async_graphql::Error> {
|
||||
info!("search({after:?} {before:?} {first:?} {last:?} {query:?}");
|
||||
if query.is_snoozed {
|
||||
warn!("TODO implement snooze for newsreader::search");
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
if !is_newsreader_query(query) {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
@@ -212,11 +215,7 @@ pub async fn thread(
|
||||
}
|
||||
let title = clean_title(&r.title.unwrap_or("NO TITLE".to_string())).await?;
|
||||
let is_read = r.is_read.unwrap_or(false);
|
||||
let timestamp = r
|
||||
.date
|
||||
.expect("post missing date")
|
||||
.assume_utc()
|
||||
.unix_timestamp();
|
||||
let timestamp = r.date.expect("post missing date").and_utc().timestamp();
|
||||
Ok(Thread::News(NewsPost {
|
||||
thread_id,
|
||||
is_read,
|
||||
@@ -353,6 +352,9 @@ fn slurp_contents_selectors() -> HashMap<String, Vec<Selector>> {
|
||||
"natwelch.com".to_string() => vec![
|
||||
Selector::parse("article div.prose").unwrap(),
|
||||
],
|
||||
"seiya.me".to_string() => vec![
|
||||
Selector::parse("header + div").unwrap(),
|
||||
],
|
||||
"rustacean-station.org".to_string() => vec![
|
||||
Selector::parse("article").unwrap(),
|
||||
],
|
||||
|
||||
964
server/src/nm.rs
964
server/src/nm.rs
File diff suppressed because it is too large
Load Diff
35
server/src/ws.rs
Normal file
35
server/src/ws.rs
Normal file
@@ -0,0 +1,35 @@
|
||||
use std::{collections::HashMap, net::SocketAddr};
|
||||
|
||||
use axum::extract::ws::{Message, WebSocket};
|
||||
use letterbox_shared::WebsocketMessage;
|
||||
use tracing::{info, warn};
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct ConnectionTracker {
|
||||
peers: HashMap<SocketAddr, WebSocket>,
|
||||
}
|
||||
|
||||
impl ConnectionTracker {
|
||||
pub async fn add_peer(&mut self, socket: WebSocket, who: SocketAddr) {
|
||||
warn!("adding {who:?} to connection tracker");
|
||||
self.peers.insert(who, socket);
|
||||
self.send_message_all(WebsocketMessage::RefreshMessages)
|
||||
.await;
|
||||
}
|
||||
pub async fn send_message_all(&mut self, msg: WebsocketMessage) {
|
||||
info!("send_message_all {msg}");
|
||||
let m = serde_json::to_string(&msg).expect("failed to json encode WebsocketMessage");
|
||||
let mut bad_peers = Vec::new();
|
||||
for (who, socket) in &mut self.peers.iter_mut() {
|
||||
if let Err(e) = socket.send(Message::Text(m.clone().into())).await {
|
||||
warn!("{:?} is bad, scheduling for removal: {e}", who);
|
||||
bad_peers.push(who.clone());
|
||||
}
|
||||
}
|
||||
|
||||
for b in bad_peers {
|
||||
info!("removing bad peer {b:?}");
|
||||
self.peers.remove(&b);
|
||||
}
|
||||
}
|
||||
}
|
||||
99
server/templates/dmarc_report.html
Normal file
99
server/templates/dmarc_report.html
Normal file
@@ -0,0 +1,99 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>DMARC Report</title>
|
||||
</head>
|
||||
<body>
|
||||
{% if report.report_metadata.is_some() %}
|
||||
{% let meta = report.report_metadata.as_ref().unwrap() %}
|
||||
<b>Reporter:</b> {{ meta.org_name }}<br>
|
||||
<b>Contact:</b> {{ meta.email }}<br>
|
||||
<b>Report ID:</b> {{ meta.report_id }}<br>
|
||||
{% if meta.date_range.is_some() %}
|
||||
{% let dr = meta.date_range.as_ref().unwrap() %}
|
||||
<b>Date range:</b>
|
||||
{{ dr.begin }}
|
||||
to
|
||||
{{ dr.end }}
|
||||
<br>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if report.policy_published.is_some() %}
|
||||
{% let pol = report.policy_published.as_ref().unwrap() %}
|
||||
<b>Policy Published:</b>
|
||||
<ul>
|
||||
<li>Domain: {{ pol.domain }}</li>
|
||||
<li>ADKIM: {{ pol.adkim }}</li>
|
||||
<li>ASPF: {{ pol.aspf }}</li>
|
||||
<li>Policy: {{ pol.p }}</li>
|
||||
<li>Subdomain Policy: {{ pol.sp }}</li>
|
||||
<li>Percent: {{ pol.pct }}</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if report.record.is_some() %}
|
||||
<b>Records:</b>
|
||||
<table style="border-collapse:collapse;width:100%;font-size:0.95em;">
|
||||
<thead>
|
||||
<tr style="background:#f0f0f0;">
|
||||
<th style="border:1px solid #bbb;padding:4px 8px;">Source IP</th>
|
||||
<th style="border:1px solid #bbb;padding:4px 8px;">Count</th>
|
||||
<th style="border:1px solid #bbb;padding:4px 8px;">Header From</th>
|
||||
{% if report.has_envelope_to %}
|
||||
<th style="border:1px solid #bbb;padding:4px 8px;">Envelope To</th>
|
||||
{% endif %}
|
||||
<th style="border:1px solid #bbb;padding:4px 8px;">Disposition</th>
|
||||
<th style="border:1px solid #bbb;padding:4px 8px;">DKIM</th>
|
||||
<th style="border:1px solid #bbb;padding:4px 8px;">SPF</th>
|
||||
<th style="border:1px solid #bbb;padding:4px 8px;">Auth Results</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for rec in report.record.as_ref().unwrap() %}
|
||||
<tr>
|
||||
<td style="border:1px solid #bbb;padding:4px 8px;">{{ rec.source_ip }}</td>
|
||||
<td style="border:1px solid #bbb;padding:4px 8px;">{{ rec.count }}</td>
|
||||
<td style="border:1px solid #bbb;padding:4px 8px;">{{ rec.header_from }}</td>
|
||||
{% if report.has_envelope_to %}
|
||||
<td style="border:1px solid #bbb;padding:4px 8px;">{{ rec.envelope_to }}</td>
|
||||
{% endif %}
|
||||
<td style="border:1px solid #bbb;padding:4px 8px;">{{ rec.disposition }}</td>
|
||||
<td style="border:1px solid #bbb;padding:4px 8px;">{{ rec.dkim }}</td>
|
||||
<td style="border:1px solid #bbb;padding:4px 8px;">{{ rec.spf }}</td>
|
||||
<td style="border:1px solid #bbb;padding:4px 8px;">
|
||||
{% if rec.auth_results.is_some() %}
|
||||
{% let auth = rec.auth_results.as_ref().unwrap() %}
|
||||
{% for dkimres in auth.dkim %}
|
||||
<span style="white-space:nowrap;">
|
||||
DKIM: domain=<b>{{ dkimres.domain }}</b>
|
||||
selector=<b>{{ dkimres.selector }}</b>
|
||||
result=<b>{{ dkimres.result }}</b>
|
||||
</span><br>
|
||||
{% endfor %}
|
||||
|
||||
{% for spfres in auth.spf %}
|
||||
<span style="white-space:nowrap;">
|
||||
SPF: domain=<b>{{ spfres.domain }}</b>
|
||||
scope=<b>{{ spfres.scope }}</b>
|
||||
result=<b>{{ spfres.result }}</b>
|
||||
</span><br>
|
||||
{% endfor %}
|
||||
|
||||
{% for reason in rec.reason %}
|
||||
<span style="white-space:nowrap;">Reason: {{ reason }}</span><br>
|
||||
{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{% if report.report_metadata.is_none() && report.policy_published.is_none() && report.record.is_none() %}
|
||||
<p>No DMARC summary found.</p>
|
||||
{% endif %}
|
||||
</body>
|
||||
</html>
|
||||
109
server/templates/ical_summary.html
Normal file
109
server/templates/ical_summary.html
Normal file
@@ -0,0 +1,109 @@
|
||||
<style>
|
||||
.ical-flex {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
align-items: stretch;
|
||||
gap: 0.5em;
|
||||
max-width: 700px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.ical-flex .summary-block {
|
||||
flex: 1 1 0%;
|
||||
}
|
||||
|
||||
.ical-flex .calendar-block {
|
||||
flex: none;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
@media (max-width: 599px) {
|
||||
.ical-flex {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.ical-flex>div.summary-block {
|
||||
margin-bottom: 0.5em;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.ical-flex>div.calendar-block {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<div class="ical-flex">
|
||||
<div class="summary-block"
|
||||
style="background:#f7f7f7; border-radius:8px; box-shadow:0 2px 8px #bbb; padding:16px 18px; margin:0 0 8px 0; min-width:220px; max-width:700px; font-size:15px; color:#222;">
|
||||
<div
|
||||
style="display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 0.5em; width: 100%;">
|
||||
<div style="flex: 1 1 220px; min-width: 180px;">
|
||||
<div style="font-size:17px; font-weight:bold; margin-bottom:8px; color:#333;"><b>Summary:</b> {{ summary
|
||||
}}</div>
|
||||
<div style="margin-bottom:4px;"><b>Start:</b> {{ local_fmt_start }}</div>
|
||||
<div style="margin-bottom:4px;"><b>End:</b> {{ local_fmt_end }}</div>
|
||||
{% if !recurrence_display.is_empty() %}
|
||||
<div style="margin-bottom:4px;">
|
||||
<b>Repeats:</b> {{ recurrence_display }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if !organizer_cn.is_empty() %}
|
||||
<div style="margin-bottom:4px;"><b>Organizer:</b> {{ organizer_cn }}</div>
|
||||
{% elif !organizer.is_empty() %}
|
||||
<div style="margin-bottom:4px;"><b>Organizer:</b> {{ organizer }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if all_days.len() > 0 %}
|
||||
<div class="calendar-block" style="flex: none; margin-left: auto; min-width: 180px;">
|
||||
<table class="ical-month"
|
||||
style="border-collapse:collapse; min-width:220px; background:#fff; box-shadow:0 2px 8px #bbb; font-size:14px; margin:0;">
|
||||
<caption
|
||||
style="caption-side:top; text-align:center; font-weight:bold; font-size:16px; padding-bottom:8px 0;">
|
||||
{{ caption }}</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
{% for wd in ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] %}
|
||||
<th
|
||||
style="padding:4px 6px; border-bottom:1px solid #ccc; color:#666; font-weight:600; background:#f7f7f7">
|
||||
{{ wd }}</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for week in all_days|batch(7) %}
|
||||
<tr>
|
||||
{% for day in week %}
|
||||
{% if event_days.contains(day) %}
|
||||
<td
|
||||
data-event-day="{{ day.format("%Y-%m-%d") }}"
|
||||
style="background:#ffd700; color:#222; font-weight:bold; border:1px solid #aaa; border-radius:4px; text-align:center;">
|
||||
{{ day.day() }}
|
||||
</td>
|
||||
{% elif today.is_some() && today.unwrap() == day %}
|
||||
<td
|
||||
style="border:2px solid #2196f3; border-radius:4px; text-align:center; background:#e3f2fd; color:#222; box-shadow:0 0 0 2px #2196f3;">
|
||||
{{ day.day() }}
|
||||
</td>
|
||||
{% else %}
|
||||
<td style="border:1px solid #eee; text-align:center;background:#f7f7f7;color:#bbb;">
|
||||
{{ day.day() }}
|
||||
</td>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if !description_paragraphs.is_empty() %}
|
||||
<div style="max-width:700px; width:100%;">
|
||||
{% for p in description_paragraphs %}
|
||||
<p style="margin: 0 0 8px 0; color:#444;">{{ p }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
48
server/templates/tls_report.html
Normal file
48
server/templates/tls_report.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>TLS Report</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h3>TLS Report Summary:</h3>
|
||||
<p>Organization: {{ report.organization_name }}</p>
|
||||
<p>Date Range: {{ report.date_range.start_datetime }} to {{ report.date_range.end_datetime }}</p>
|
||||
<p>Contact: {{ report.contact_info }}</p>
|
||||
<p>Report ID: {{ report.report_id }}</p>
|
||||
|
||||
<h4><b>Policies:</b></h4>
|
||||
{% for policy in report.policies %}
|
||||
<h5><b>Policy Domain:</b> {{ policy.policy.policy_domain }}</h5>
|
||||
<ul>
|
||||
<li><b>Policy Type:</b> {{ policy.policy.policy_type }}</li>
|
||||
<li><b>Policy String:</b> {{ policy.policy.policy_string | join(", ") }}</li>
|
||||
<li><b>Successful Sessions:</b> {{ policy.summary.total_successful_session_count }}</li>
|
||||
<li><b>Failed Sessions:</b> {{ policy.summary.total_failure_session_count }}</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
{% for mx_host in policy.policy.mx_host %}
|
||||
<li><b>Hostname:</b> {{ mx_host.hostname }}, <b>Failures:</b> {{ mx_host.failure_count }}, <b>Result:</b> {{
|
||||
mx_host.result_type }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
{% for detail in policy.failure_details %}
|
||||
<li><b>Result:</b> {{ detail.result_type }}, <b>Sending IP:</b> {{ detail.sending_mta_ip }}, <b>Failed
|
||||
Sessions:</b> {{ detail.failed_session_count }}
|
||||
{% if detail.failure_reason_code != "" %}
|
||||
(<b>Reason:</b> {{ detail.failure_reason_code }})
|
||||
{% endif %}
|
||||
</li>
|
||||
(<b>Receiving IP:</b> {{ detail.receiving_ip }})
|
||||
(<b>Receiving MX:</b> {{ detail.receiving_mx_hostname }})
|
||||
(<b>Additional Info:</b> {{ detail.additional_info }})
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
48
server/testdata/dmarc-example-no-envelope-to.xml
vendored
Normal file
48
server/testdata/dmarc-example-no-envelope-to.xml
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<feedback>
|
||||
<version>1.0</version>
|
||||
<report_metadata>
|
||||
<org_name>google.com</org_name>
|
||||
<email>noreply-dmarc-support@google.com</email>
|
||||
<extra_contact_info>https://support.google.com/a/answer/2466580</extra_contact_info>
|
||||
<report_id>5142106658860834914</report_id>
|
||||
<date_range>
|
||||
<begin>1755302400</begin>
|
||||
<end>1755388799</end>
|
||||
</date_range>
|
||||
</report_metadata>
|
||||
<policy_published>
|
||||
<domain>xinu.tv</domain>
|
||||
<adkim>s</adkim>
|
||||
<aspf>s</aspf>
|
||||
<p>quarantine</p>
|
||||
<sp>reject</sp>
|
||||
<pct>100</pct>
|
||||
<np>reject</np>
|
||||
</policy_published>
|
||||
<record>
|
||||
<row>
|
||||
<source_ip>74.207.253.222</source_ip>
|
||||
<count>1</count>
|
||||
<policy_evaluated>
|
||||
<disposition>none</disposition>
|
||||
<dkim>pass</dkim>
|
||||
<spf>pass</spf>
|
||||
</policy_evaluated>
|
||||
</row>
|
||||
<identifiers>
|
||||
<header_from>xinu.tv</header_from>
|
||||
</identifiers>
|
||||
<auth_results>
|
||||
<dkim>
|
||||
<domain>xinu.tv</domain>
|
||||
<result>pass</result>
|
||||
<selector>mail</selector>
|
||||
</dkim>
|
||||
<spf>
|
||||
<domain>xinu.tv</domain>
|
||||
<result>pass</result>
|
||||
</spf>
|
||||
</auth_results>
|
||||
</record>
|
||||
</feedback>
|
||||
78
server/testdata/dmarc-example.xml
vendored
Normal file
78
server/testdata/dmarc-example.xml
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0"?>
|
||||
<feedback xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<version>1.0</version>
|
||||
<report_metadata>
|
||||
<org_name>Outlook.com</org_name>
|
||||
<email>dmarcreport@microsoft.com</email>
|
||||
<report_id>e6c5a2ce6e074d7d8cd041a0d6f32a3d</report_id>
|
||||
<date_range>
|
||||
<begin>1755302400</begin>
|
||||
<end>1755388800</end>
|
||||
</date_range>
|
||||
</report_metadata>
|
||||
<policy_published>
|
||||
<domain>xinu.tv</domain>
|
||||
<adkim>s</adkim>
|
||||
<aspf>s</aspf>
|
||||
<p>quarantine</p>
|
||||
<sp>reject</sp>
|
||||
<pct>100</pct>
|
||||
<fo>1</fo>
|
||||
</policy_published>
|
||||
<record>
|
||||
<row>
|
||||
<source_ip>74.207.253.222</source_ip>
|
||||
<count>1</count>
|
||||
<policy_evaluated>
|
||||
<disposition>none</disposition>
|
||||
<dkim>pass</dkim>
|
||||
<spf>pass</spf>
|
||||
</policy_evaluated>
|
||||
</row>
|
||||
<identifiers>
|
||||
<envelope_to>msn.com</envelope_to>
|
||||
<envelope_from>xinu.tv</envelope_from>
|
||||
<header_from>xinu.tv</header_from>
|
||||
</identifiers>
|
||||
<auth_results>
|
||||
<dkim>
|
||||
<domain>xinu.tv</domain>
|
||||
<selector>mail</selector>
|
||||
<result>pass</result>
|
||||
</dkim>
|
||||
<spf>
|
||||
<domain>xinu.tv</domain>
|
||||
<scope>mfrom</scope>
|
||||
<result>pass</result>
|
||||
</spf>
|
||||
</auth_results>
|
||||
</record>
|
||||
<record>
|
||||
<row>
|
||||
<source_ip>74.207.253.222</source_ip>
|
||||
<count>1</count>
|
||||
<policy_evaluated>
|
||||
<disposition>none</disposition>
|
||||
<dkim>pass</dkim>
|
||||
<spf>pass</spf>
|
||||
</policy_evaluated>
|
||||
</row>
|
||||
<identifiers>
|
||||
<envelope_to>hotmail.com</envelope_to>
|
||||
<envelope_from>xinu.tv</envelope_from>
|
||||
<header_from>xinu.tv</header_from>
|
||||
</identifiers>
|
||||
<auth_results>
|
||||
<dkim>
|
||||
<domain>xinu.tv</domain>
|
||||
<selector>mail</selector>
|
||||
<result>pass</result>
|
||||
</dkim>
|
||||
<spf>
|
||||
<domain>xinu.tv</domain>
|
||||
<scope>mfrom</scope>
|
||||
<result>pass</result>
|
||||
</spf>
|
||||
</auth_results>
|
||||
</record>
|
||||
</feedback>
|
||||
167
server/testdata/google-calendar-example-2.eml
vendored
Normal file
167
server/testdata/google-calendar-example-2.eml
vendored
Normal file
@@ -0,0 +1,167 @@
|
||||
Return-Path: <couchmoney+caf_=gmail=xinu.tv@gmail.com>
|
||||
Delivered-To: bill@xinu.tv
|
||||
Received: from phx.xinu.tv [74.207.253.222]
|
||||
by nixos-01.h.xinu.tv with IMAP (fetchmail-6.5.1)
|
||||
for <wathiede@localhost> (single-drop); Mon, 25 Aug 2025 14:29:47 -0700 (PDT)
|
||||
Received: from phx.xinu.tv
|
||||
by phx.xinu.tv with LMTP
|
||||
id TPD3E8vVrGjawyMAJR8clQ
|
||||
(envelope-from <couchmoney+caf_=gmail=xinu.tv@gmail.com>)
|
||||
for <bill@xinu.tv>; Mon, 25 Aug 2025 14:29:47 -0700
|
||||
X-Original-To: gmail@xinu.tv
|
||||
Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::12e; helo=mail-lf1-x12e.google.com; envelope-from=couchmoney+caf_=gmail=xinu.tv@gmail.com; receiver=xinu.tv
|
||||
Authentication-Results: phx.xinu.tv;
|
||||
dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20230601 header.b=4sz9KOqm
|
||||
Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e])
|
||||
by phx.xinu.tv (Postfix) with ESMTPS id 2F9058B007
|
||||
for <gmail@xinu.tv>; Mon, 25 Aug 2025 14:29:45 -0700 (PDT)
|
||||
Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-55f4969c95aso994593e87.0
|
||||
for <gmail@xinu.tv>; Mon, 25 Aug 2025 14:29:45 -0700 (PDT)
|
||||
ARC-Seal: i=2; a=rsa-sha256; t=1756157384; cv=pass;
|
||||
d=google.com; s=arc-20240605;
|
||||
b=Y2CP7y9twLnWB5v8iyzZCw0vp33wQBS0qzltdtzX2NIWFhHu6MEp2XH8cONssaGrEN
|
||||
kyjXajT7uaEpn6G8H6/NB9v9Vo2yk5Lq2f+RhODMYoocYs9YY9NJI4ZxMph0UeMO6RkQ
|
||||
m+HH0iIeC2Mzgj1Bzq4qFEwb397YIijoxx+1RxyA2D3cwSuZtERSvFOEkHqv9ziWxBcD
|
||||
u3tvySEuzjyQFU6bxfkax6sZljSRGzfj0iZJAl/Fw5tUgrhndQ55O5RDe4NfPNj0cw/3
|
||||
XDELzsnepBgnW8Jpqpnh7iK6XMFSf4sPQmyiMCMDNVYtmm6hYFNo3/dOpgaPn/ImRr8j
|
||||
d9lw==
|
||||
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;
|
||||
h=to:from:subject:date:message-id:auto-submitted:reply-to
|
||||
:mime-version:dkim-signature:delivered-to;
|
||||
bh=RJDaNO07yMMdVMfY1VnSbfmQtoKb6bs6XzWwF6+91ZY=;
|
||||
fh=xB02AmI2fnPF5rMnM90IwqQ6Il76V+xMgSnSW+E42fE=;
|
||||
b=H7Ze4a8zoCYB77xcnUnFTogJ/utYS/USzTL/7eS3nA6OPbD+zWRiiVmbSfQcNK7d25
|
||||
LapXyYnRJKgc8sqqQ6XO26STA8xx/9G620pdTytChIzKsmm/T5cdlf1M8DJ+NlwkzzSG
|
||||
6Xe5I0MuXSKzBDMmcBcMlY9+mp61eZNo/cGT34MfZvLDS7JCs5uQYy2gRyajCKzRddEP
|
||||
NBfMgnP1Ag9B5KkpJr4QfA2IWoNlj/qom/bRcdcdjwQ3gwDeiG8rdrEwBt9juwqk8d95
|
||||
C0LnVKfrXAZgolmJpljyIFb1IMMyBUIQhK+7cXFhV1AD6Laz0df9gmPWp5mGZz9qlYaY
|
||||
BqJA==;
|
||||
darn=xinu.tv
|
||||
ARC-Authentication-Results: i=2; mx.google.com;
|
||||
dkim=pass header.i=@google.com header.s=20230601 header.b=4sz9KOqm;
|
||||
spf=pass (google.com: domain of 3odssaaoscuanoeqnnkpiuugcvvnguejqqnu.qtieqwejoqpgaiockn.eqo@calendar-server.bounces.google.com designates 209.85.220.73 as permitted sender) smtp.mailfrom=3OdSsaAoSCuANOEQNNKPIUUGCVVNGUEJQQNU.QTIEQWEJOQPGaIOCKN.EQO@calendar-server.bounces.google.com;
|
||||
dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com;
|
||||
dara=pass header.i=@gmail.com
|
||||
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=1e100.net; s=20230601; t=1756157384; x=1756762184;
|
||||
h=to:from:subject:date:message-id:auto-submitted:reply-to
|
||||
:mime-version:dkim-signature:delivered-to:x-forwarded-for
|
||||
:x-forwarded-to:x-gm-message-state:from:to:cc:subject:date
|
||||
:message-id:reply-to;
|
||||
bh=RJDaNO07yMMdVMfY1VnSbfmQtoKb6bs6XzWwF6+91ZY=;
|
||||
b=m95okwnmqNvW4GhCfY8yZvCu5NxuhHCL2+A54SlIrRudednXK05YGzjZ5LOuCAaY1g
|
||||
htpRv2cGHBj2mEnHh+3GIX5vQCmXw2ptzOGzfYe9TwavuKPkkKPiSD5wA1fk8quqHDOD
|
||||
4XDM7dsn3xewJ+6GQyc6NPBQq53hmpAojbLXnmNtAIyfAvuxtHP1G+GSO+ZIApgg56K6
|
||||
TaYrwqnRx66P8B2Ze111LCdnmOOLzweJ1muYyavPdCtTG5BbJgqzaI67bQhuUNZDhVbP
|
||||
FdtT4Q7WzNt30JHCVIAkkHejD9Fh/mYSmETXpD+ISvZJ47DNnLP4RXjmmAWcHJkKsh+q
|
||||
v3QQ==
|
||||
X-Forwarded-Encrypted: i=2; AJvYcCUeIjyIxPoWuMqg9l5aomQv7Z9wLYkwDIS1FYz7bNmHs1Cs0CSHG8Y5B0iU/nlo9xRenTW/Xw==@xinu.tv
|
||||
X-Gm-Message-State: AOJu0Yznjr5TC7UpZJk74jrsJzMBwx6/39s9e5ufIA5/FmHZ6I1bEdTc
|
||||
vqpeeLdzSZTI2uZiR7zzKHiwmNJHt/LncR9kDR5f0I6b3MZuXpAgr0aKYdXw7B+b+h7D7uMM3Tm
|
||||
JF9ccf09JxIzRzeRI9Vb52PUs4SIeiIU9J80QY53UqN/Rx8XMF+ncRSX5d4V4pQ==
|
||||
X-Received: by 2002:a05:6512:110e:b0:55f:3bab:f204 with SMTP id 2adb3069b0e04-55f3babf35emr3087055e87.31.1756156987711;
|
||||
Mon, 25 Aug 2025 14:23:07 -0700 (PDT)
|
||||
X-Forwarded-To: gmail@xinu.tv
|
||||
X-Forwarded-For: couchmoney@gmail.com gmail@xinu.tv
|
||||
Delivered-To: couchmoney@gmail.com
|
||||
Received: by 2002:a05:6504:6116:b0:2b8:eb6f:82ec with SMTP id i22csp44357ltt;
|
||||
Mon, 25 Aug 2025 14:23:06 -0700 (PDT)
|
||||
X-Received: by 2002:a05:6e02:164e:b0:3ed:94a6:2edb with SMTP id e9e14a558f8ab-3ed94a63097mr41416195ab.21.1756156986122;
|
||||
Mon, 25 Aug 2025 14:23:06 -0700 (PDT)
|
||||
ARC-Seal: i=1; a=rsa-sha256; t=1756156986; cv=none;
|
||||
d=google.com; s=arc-20240605;
|
||||
b=Nu0W/67J2nYqDAXf27QdfmUyuA6TGJwusKLaHRaE05YdEu/FWLfUk2ATV+g3iUQ19b
|
||||
wh7awaA5kemxwiBqAy5kjjlXqlDrkK0Ow2fANdc6lRKvlRNJRYUnojMkP8w/v4Nv8YQj
|
||||
Wci0HMhL4ni/yeqXeoaj1yKtwJU5MvRMxZZC7TinlCHKF5+MqgD8VNax8OTDOqxYvSDi
|
||||
aIlyUBTial0AiP/K+3bsoIWEc2RoyBBBNIe88C4s1fcv17GCGn5RkN3lYtr+nwvp5wNE
|
||||
fKxPCYMtXkNyv8jgjmgxKLcYBDK0B4Zo+ghMWXZneDWo3qotDVkr0GBC3J2N7BcZpjCA
|
||||
XEDA==
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;
|
||||
h=to:from:subject:date:message-id:auto-submitted:reply-to
|
||||
:mime-version:dkim-signature;
|
||||
bh=RJDaNO07yMMdVMfY1VnSbfmQtoKb6bs6XzWwF6+91ZY=;
|
||||
fh=mbzrMIWIgWMC0ni1xEx+ViW4J0RLAdLdPT2cX81nTlk=;
|
||||
b=NvhrlkKGEVx63UMsx510U8ePUo7OgRQBWxZ4BIpQWg6Fk0jJPaZgRoEpUdZ747et1P
|
||||
rWTx/yVaEUHBqWtt0I4ktiD8Hr4cVqAwKvtiN32JpkGCsVBjYBWqxEalWIOg6abn8xLE
|
||||
7x9j4GqD/cQhd3DiS6UtADsJ67MjjzLpGkskvxo67vKRGCfSLCKdbna2LO5TtoZ7fKO7
|
||||
i+dhDol6IIgA2Sg+PZlzq6gbZTaFbglUNI7uOwz0fNWjhHH4ZfmPEycYxJ9bTuPISrqS
|
||||
BkXxGQFkvlg42NHWt5L8aPzrx8OMoYfTniIqU19GeEFEVUbmzYCg/twZ0f5nxugHWDbD
|
||||
PMvQ==;
|
||||
dara=google.com
|
||||
ARC-Authentication-Results: i=1; mx.google.com;
|
||||
dkim=pass header.i=@google.com header.s=20230601 header.b=4sz9KOqm;
|
||||
spf=pass (google.com: domain of 3odssaaoscuanoeqnnkpiuugcvvnguejqqnu.qtieqwejoqpgaiockn.eqo@calendar-server.bounces.google.com designates 209.85.220.73 as permitted sender) smtp.mailfrom=3OdSsaAoSCuANOEQNNKPIUUGCVVNGUEJQQNU.QTIEQWEJOQPGaIOCKN.EQO@calendar-server.bounces.google.com;
|
||||
dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com;
|
||||
dara=pass header.i=@gmail.com
|
||||
Received: from mail-sor-f73.google.com (mail-sor-f73.google.com. [209.85.220.73])
|
||||
by mx.google.com with SMTPS id ca18e2360f4ac-886c8fc41ebsor461233039f.7.2025.08.25.14.23.05
|
||||
for <couchmoney@gmail.com>
|
||||
(Google Transport Security);
|
||||
Mon, 25 Aug 2025 14:23:06 -0700 (PDT)
|
||||
Received-SPF: pass (google.com: domain of 3odssaaoscuanoeqnnkpiuugcvvnguejqqnu.qtieqwejoqpgaiockn.eqo@calendar-server.bounces.google.com designates 209.85.220.73 as permitted sender) client-ip=209.85.220.73;
|
||||
Authentication-Results: mx.google.com;
|
||||
dkim=pass header.i=@google.com header.s=20230601 header.b=4sz9KOqm;
|
||||
spf=pass (google.com: domain of 3odssaaoscuanoeqnnkpiuugcvvnguejqqnu.qtieqwejoqpgaiockn.eqo@calendar-server.bounces.google.com designates 209.85.220.73 as permitted sender) smtp.mailfrom=3OdSsaAoSCuANOEQNNKPIUUGCVVNGUEJQQNU.QTIEQWEJOQPGaIOCKN.EQO@calendar-server.bounces.google.com;
|
||||
dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com;
|
||||
dara=pass header.i=@gmail.com
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=google.com; s=20230601; t=1756156985; x=1756761785; dara=google.com;
|
||||
h=to:from:subject:date:message-id:auto-submitted:reply-to
|
||||
:mime-version:from:to:cc:subject:date:message-id:reply-to;
|
||||
bh=RJDaNO07yMMdVMfY1VnSbfmQtoKb6bs6XzWwF6+91ZY=;
|
||||
b=4sz9KOqmGGwObcaR0iSSMVeeMvZHqMzvY4cw++RddJd0V48WoyPPI5q1oMeGiVZ6fm
|
||||
eEWVr8xH9/T1JUqUZXJHY6CPixN9nTpLvZlpikG1KOFv5+I5DNVX/O5i6M5C/yIPRVGv
|
||||
ja0ygA7WTL48IkHV7+PTPwHmhF8zv1/BeNdko4BSywfql64J6NMM5RnOAejTIf5AR/IL
|
||||
CW7H2IcmiOGBHfgMApQljg3wB+WgUel7RXZfMnHCbSlmynJ6bDJ4tq7uU16GLpnI6qAe
|
||||
s9w8cOpFPiQk8uKEqdc682XxKlwqYdh07RWO/EdlZ8WeSoxMfU6YZL7c1s6xxK2c9sT7
|
||||
8Xxg==
|
||||
X-Google-Smtp-Source: AGHT+IFJwttd47Uo06h0EKkogFtVf4poWcHfmodh4dZqSviwYROSgnnyI2ZJSibXGnOUHiLIfAwFn6KP9CzXMoyncWSb
|
||||
MIME-Version: 1.0
|
||||
X-Received: by 2002:a05:6602:14c9:b0:884:47f0:b89f with SMTP id
|
||||
ca18e2360f4ac-886bd0f2960mr1726062839f.3.1756156985586; Mon, 25 Aug 2025
|
||||
14:23:05 -0700 (PDT)
|
||||
Reply-To: tconvertino@gmail.com
|
||||
Auto-Submitted: auto-generated
|
||||
Message-ID: <calendar-43033c42-cc1e-4014-a5e8-c4552d41247e@google.com>
|
||||
Date: Mon, 25 Aug 2025 21:23:05 +0000
|
||||
Subject: New event: McClure BLT @ Monthly from 7:30am to 8:30am on the second
|
||||
Thursday from Thu Sep 11 to Fri Jan 30, 2026 (PDT) (tconvertino@gmail.com)
|
||||
From: "lmcollings@seattleschools.org (Google Calendar)" <calendar-notification@google.com>
|
||||
To: couchmoney@gmail.com
|
||||
Content-Type: multipart/alternative; boundary="0000000000004bc1be063d372904"
|
||||
|
||||
--0000000000004bc1be063d372904
|
||||
Content-Type: text/plain; charset="UTF-8"; format=flowed; delsp=yes
|
||||
Content-Transfer-Encoding: base64
|
||||
|
||||
TWNDbHVyZSBCTFQNCk1vbnRobHkgZnJvbSA3OjMwYW0gdG8gODozMGFtIG9uIHRoZSBzZWNvbmQg
|
||||
VGh1cnNkYXkgZnJvbSBUaHVyc2RheSBTZXAgMTEgIA0KdG8gRnJpZGF5IEphbiAzMCwgMjAyNg0K
|
||||
UGFjaWZpYyBUaW1lIC0gTG9zIEFuZ2VsZXMNCg0KTG9jYXRpb24NCk1jQ2x1cmUgTGlicmFyeQkN
|
||||
Cmh0dHBzOi8vd3d3Lmdvb2dsZS5jb20vbWFwcy9zZWFyY2gvTWNDbHVyZStMaWJyYXJ5P2hsPWVu
|
||||
DQoNCg0KDQpCTFQgd2lsbCBtZWV0IG9uIHRoZSAybmQgVGh1cnNkYXkgb2YgZXZlcnkgbW9udGgg
|
||||
dW50aWwgSmFudWFyeSB3aGVuIHdlICANCmJlZ2luIGxvb2tpbmcgYXQgYnVkZ2V0LiBBZGRpdGlv
|
||||
bmFsIG1lZXRpbmdzIG1heSBhbHNvIGJlIHNjaGVkdWxlZCBlYXJsaWVyICANCmlmIG5lZWRlZC4N
|
||||
ClRoYW5rcywNCk1jQ2x1cmUgQkxUDQoNCg0KDQpPcmdhbml6ZXINCmxtY29sbGluZ3NAc2VhdHRs
|
||||
ZXNjaG9vbHMub3JnDQpsbWNvbGxpbmdzQHNlYXR0bGVzY2hvb2xzLm9yZw0KDQpHdWVzdHMNCmxt
|
||||
Y29sbGluZ3NAc2VhdHRsZXNjaG9vbHMub3JnIC0gb3JnYW5pemVyDQp0Y29udmVydGlub0BnbWFp
|
||||
bC5jb20gLSBjcmVhdG9yDQptYW5kcy5hbmRydXNAZ21haWwuY29tDQphbXNjaHVtZXJAc2VhdHRs
|
||||
ZXNjaG9vbHMub3JnDQphcGplbm5pbmdzQHNlYXR0bGVzY2hvbHMub3JnDQpsbWJsYXVAc2VhdHRs
|
||||
ZXNjaG9vbHMub3JnDQptbmxhbmRpc0BzZWF0dGxlc2Nob29scy5vcmcNCnRtYnVyY2hhcmR0QHNl
|
||||
YXR0bGVzY2hvb2xzLm9yZw0KbWNjbHVyZWFsbHN0YWZmQHNlYXR0bGVzY2hvbHMub3JnIC0gb3B0
|
||||
aW9uYWwNClZpZXcgYWxsIGd1ZXN0IGluZm8gIA0KaHR0cHM6Ly9jYWxlbmRhci5nb29nbGUuY29t
|
||||
L2NhbGVuZGFyL3I/ZWlkPVh6WXdjVE13WXpGbk5qQnZNekJsTVdrMk1HODBZV016WnpZd2NtbzRa
|
||||
M0JzT0RoeWFqSmpNV2c0TkhNelpHZzVae1l3Y3pNd1l6Rm5OakJ2TXpCak1XYzNORG96T0dkb2Fq
|
||||
WXhNR3RoWjNFeE5qUnhhemhuY0djMk5HOHpNR014WnpZd2J6TXdZekZuTmpCdk16QmpNV2MyTUc4
|
||||
ek1tTXhaell3YnpNd1l6Rm5PR2R4TTJGalNXODNOSUF6YVdReGJUY3hNbXBqWkRGck5qVXhNamhq
|
||||
TVcwM01USnFNbWRvYnpnMGN6TTJaSEJwTmprek1DQjBZMjl1ZG1WeWRHbHViMEJ0JmVzPTENCg0K
|
||||
fn4vL35+DQpJbnZpdGF0aW9uIGZyb20gR29vZ2xlIENhbGVuZGFyOiBodHRwczovL2NhbGVuZGFy
|
||||
Lmdvb2dsZS5jb20vY2FsZW5kYXIvDQoNCllvdSBhcmUgcmVjZWl2aW5nIHRoaXMgZW1haWwgYmVj
|
||||
YXVzZSB5b3UgYXJlIHN1YnNjcmliZWQgdG8gY2FsZW5kYXIgIA0Kbm90aWZpY2F0aW9ucy4gVG8g
|
||||
c3RvcCByZWNlaXZpbmcgdGhlc2UgZW1haWxzLCBnbyB0byAgDQpodHRwczovL2NhbGVuZGFyLmdv
|
||||
b2dsZS5jb20vY2FsZW5kYXIvci9zZXR0aW5ncywgc2VsZWN0IHRoaXMgY2FsZW5kYXIsIGFuZCANCmNoYW5nZSAiT3RoZXIgbm90aWZpY2F0aW9ucyIuDQoNCkZvcndhcmRpbmcgdGhpcyBpbnZp
|
||||
dGF0aW9uIGNvdWxkIGFsbG93IGFueSByZWNpcGllbnQgdG8gc2VuZCBhIHJlc3BvbnNlIHRvICAN
|
||||
CnRoZSBvcmdhbml6ZXIsIGJlIGFkZGVkIHRvIHRoZSBndWVzdCBsaXN0LCBpbnZpdGUgb3RoZXJz
|
||||
IHJlZ2FyZGxlc3Mgb2YgIA0KdGhlaXIgb3duIGludml0YXRpb24gc3RhdHVzLCBvciBtb2RpZnkg
|
||||
eW91ciBSU1ZQLg0KDQpMZWFybiBtb3JlIGh0dHBzOi8vc3VwcG9ydC5nb29nbGUuY29tL2NhbGVu
|
||||
ZGFyL2Fuc3dlci8zNzEzNSNmb3J3YXJkaW5nDQo=
|
||||
--0000000000004bc1be063d372904--
|
||||
206
server/testdata/google-calendar-example-3.eml
vendored
Normal file
206
server/testdata/google-calendar-example-3.eml
vendored
Normal file
@@ -0,0 +1,206 @@
|
||||
Return-Path: <couchmoney+caf_=gmail=xinu.tv@gmail.com>
|
||||
Delivered-To: bill@xinu.tv
|
||||
Received: from phx.xinu.tv [74.207.253.222]
|
||||
by nixos-01.h.xinu.tv with IMAP (fetchmail-6.5.1)
|
||||
for <wathiede@localhost> (single-drop); Thu, 28 Aug 2025 12:11:15 -0700 (PDT)
|
||||
Received: from phx.xinu.tv
|
||||
by phx.xinu.tv with LMTP
|
||||
id 1gVrANOpsGg9TSQAJR8clQ
|
||||
(envelope-from <couchmoney+caf_=gmail=xinu.tv@gmail.com>)
|
||||
for <bill@xinu.tv>; Thu, 28 Aug 2025 12:11:15 -0700
|
||||
X-Original-To: gmail@xinu.tv
|
||||
Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::230; helo=mail-lj1-x230.google.com; envelope-from=couchmoney+caf_=gmail=xinu.tv@gmail.com; receiver=xinu.tv
|
||||
Authentication-Results: phx.xinu.tv;
|
||||
dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20230601 header.b=RjBRlfFL;
|
||||
dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=HaiL0lRL
|
||||
Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230])
|
||||
by phx.xinu.tv (Postfix) with ESMTPS id B4E848B007
|
||||
for <gmail@xinu.tv>; Thu, 28 Aug 2025 12:11:13 -0700 (PDT)
|
||||
Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-336a85b8fc5so8142611fa.3
|
||||
for <gmail@xinu.tv>; Thu, 28 Aug 2025 12:11:13 -0700 (PDT)
|
||||
ARC-Seal: i=2; a=rsa-sha256; t=1756408272; cv=pass;
|
||||
d=google.com; s=arc-20240605;
|
||||
b=Nq93fJSEgPuxWsaf3dc6cCKbOP/bXMQJfmuZJBvrid99GipahJY/Ka4SGoLc8HBMH2
|
||||
Ip9YDLG2Lblqz/N1KOud9gnAmQ6Zg4hfPZGvhUfCGaXbCi2lOhRlfx6QM0lM1B8rAXaA
|
||||
S3Lt2qFFXrVBlvaJePwI+wVpc1wPbvd5PblaaUTYUVJeYSfdPtgNAy0Aehty9TF0Jo2h
|
||||
9yrzCWMJ6kMTpsDw7sfDSnv7s43Q3jOPzXDjHdJfrK8aUXGQenwT+1acJkIw78wBFt3R
|
||||
IG5CBLIKmwDpjquJzRPkEjHiNDRxhaKaCShTCVLTjmrYgbHXPM/gUewaKLfeIuTzOVuA
|
||||
mnkw==
|
||||
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;
|
||||
h=to:from:subject:date:message-id:auto-submitted:sender:reply-to
|
||||
:mime-version:dkim-signature:dkim-signature:delivered-to;
|
||||
bh=lgr/fFBrye/qM438Us9TAp1/DYWNuYxn2NUL4vzX/SU=;
|
||||
fh=twOWSYT+4sbeBuT1oeA5xzauBIj0SLZH5qI1YanOQio=;
|
||||
b=FBstDUezbqJRRRxTwlKY4UXNSJ4z9aZdvb9KOlxXfFLCzUh3r5w+9P4+a/uH1Uw65g
|
||||
xbxzPRgMduPWgKDAweqXk9SGX3mjqF0oyd5yhGTiU/jpHg6ZLXf//g45zJqRjfMnRi8I
|
||||
vbEEAxUKyhPfbrQ8/byfq/isJHFiR0Vjr2U0HOqcctRgCTfrZr1b14jRVopjVqhk37ef
|
||||
KapCbmTbBLznJLQH6jfi4LvKpSlJDW6l7R/CC4WtAzgcmHyA9nfjM4+egLg15giMpn3a
|
||||
549c+jYBFgsjblhmyFw05dGSpUvP+jJeKTcFnlZe6yU7Qjnqhs6TlV/Jm8HAkPH1zdS5
|
||||
XDAw==;
|
||||
darn=xinu.tv
|
||||
ARC-Authentication-Results: i=2; mx.google.com;
|
||||
dkim=pass header.i=@google.com header.s=20230601 header.b=RjBRlfFL;
|
||||
dkim=pass header.i=@gmail.com header.s=20230601 header.b=HaiL0lRL;
|
||||
spf=pass (google.com: domain of tconvertino@gmail.com designates 209.85.220.73 as permitted sender) smtp.mailfrom=tconvertino@gmail.com;
|
||||
dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com;
|
||||
dara=pass header.i=@gmail.com
|
||||
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=1e100.net; s=20230601; t=1756408272; x=1757013072;
|
||||
h=to:from:subject:date:message-id:auto-submitted:sender:reply-to
|
||||
:mime-version:dkim-signature:dkim-signature:delivered-to
|
||||
:x-forwarded-for:x-forwarded-to:x-gm-message-state:from:to:cc
|
||||
:subject:date:message-id:reply-to;
|
||||
bh=lgr/fFBrye/qM438Us9TAp1/DYWNuYxn2NUL4vzX/SU=;
|
||||
b=VJaqGIpPE1gxGhbAl1Np3yZR/0QPEs/C6KtFdnsaH9ubxFrDOeF4uIygqAUN9YFmll
|
||||
YZsN4G0iexB097atKRIXLrreE3pH3cOY56ym94fWRZGythS0MRZlw40QoHLLf3joTC6D
|
||||
WHtaNcea0hO3V6l/6gKlOffJ/cv2GnyPi0Sv7neOC5v18VTxZwZn+Wp+pTPpWFcmvQ4J
|
||||
IMSV0vNgIRrYJaItUt1d59B9Ah+0bcyd7jJ0TDRVvN97S8iSlSIw6NMwxjZMuyJSWO7X
|
||||
5zm8xA+H+L8+pLMmGKfdBYxhNo/ibdwda+w/ECKIjdnFtbreGbYLsUnkLdPeumQ6LXs/
|
||||
Q2mg==
|
||||
X-Forwarded-Encrypted: i=2; AJvYcCXpJ2X9EF2q2d4efhhe9B8o7LcuPPe25tZZwgkhfxerDzSbY0obB8Eik41xltO5i7k4ANaJKQ==@xinu.tv
|
||||
X-Gm-Message-State: AOJu0Yz5+coY8ftW9IS5OD7ZbkwXnD43Mcp5BZjn5I2cv4v+u+ilxOi+
|
||||
0DKABW1HVFh3MqQ/Z9nU+svpDl4kHa5lTr5siCXHTf0Wpo4LT3UsILyLUvwua0tsx9da14Gl6Fb
|
||||
R1xVSmax6VR4PgZzrnOKZZx1x1re2RaTFGMAaA0Ei5ua3bZpn8axccwggYc94Jw==
|
||||
X-Received: by 2002:a2e:a984:0:b0:336:7b24:2af7 with SMTP id 38308e7fff4ca-3367b242dd2mr36540291fa.17.1756408271464;
|
||||
Thu, 28 Aug 2025 12:11:11 -0700 (PDT)
|
||||
X-Forwarded-To: gmail@xinu.tv
|
||||
X-Forwarded-For: couchmoney@gmail.com gmail@xinu.tv
|
||||
Delivered-To: couchmoney@gmail.com
|
||||
Received: by 2002:a05:6504:955:b0:2b8:eb6f:82ec with SMTP id k21csp1133490lts;
|
||||
Thu, 28 Aug 2025 12:11:10 -0700 (PDT)
|
||||
X-Received: by 2002:a05:6602:3c3:b0:86d:9ec7:267e with SMTP id ca18e2360f4ac-886bd155520mr3955796839f.4.1756408269941;
|
||||
Thu, 28 Aug 2025 12:11:09 -0700 (PDT)
|
||||
ARC-Seal: i=1; a=rsa-sha256; t=1756408269; cv=none;
|
||||
d=google.com; s=arc-20240605;
|
||||
b=Gvk+jquchLt+hySEph55datOhigiuAMXW4mgi5vTVp51rzJ7PB+rH7vx23tj1QAB+0
|
||||
RIOZTaB67H8yFXwAUNZWd1GMnpocZR+tI4bMxbKzDYd7zgaTzSSa2InDROhqOhHqBpX8
|
||||
eWD23F+xRon/qEYQd0YEjZVt20WvKzpvjbpvCyWpq7Z4y376KoJArxsspsKZlALrCfKq
|
||||
cyt9B/EKr3ZmAzRiswiH7KY/iHd1qYgtYy0tYGNtjU0nZ+5fK/tVlw+lJuLtt+aA+ZCy
|
||||
o5y8Y5/thdSJsT159u+bV5eICZWC5kGnztNsXg0Nr2H22XzUC1epWZvJkZW2j+SXQm5k
|
||||
Wdew==
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;
|
||||
h=to:from:subject:date:message-id:auto-submitted:sender:reply-to
|
||||
:mime-version:dkim-signature:dkim-signature;
|
||||
bh=lgr/fFBrye/qM438Us9TAp1/DYWNuYxn2NUL4vzX/SU=;
|
||||
fh=mbzrMIWIgWMC0ni1xEx+ViW4J0RLAdLdPT2cX81nTlk=;
|
||||
b=hra/E01IWuIFrWtk3uTcoj04apbHeQcQBSINqYDpr3cO7rXknIvpeXoWLvk0EIJI5y
|
||||
syt60ekwVnsX/qb2F1HbN896dm97QrEGIwAiJyN2oTFauLoYObpcuhPS317hU4+YubO+
|
||||
RLUntXsPK2qiifmPCOMPD6wACQB9YXpOPHrrl5x/yZlria1Tfg3XQcZIYsWcU/Qil94x
|
||||
GtK+i82uzPXEQ0fVieEgJaZtmrW7OFEpPjd1KGp6sYtGvOxUfxVKl5MhLrCqfcLN9fd7
|
||||
Xren0S32b/IsZA8ASdFca3CNjaAL2Ajlatb39XN17txnKrpQje/ReiVkm9wwo194NwCp
|
||||
3dfQ==;
|
||||
dara=google.com
|
||||
ARC-Authentication-Results: i=1; mx.google.com;
|
||||
dkim=pass header.i=@google.com header.s=20230601 header.b=RjBRlfFL;
|
||||
dkim=pass header.i=@gmail.com header.s=20230601 header.b=HaiL0lRL;
|
||||
spf=pass (google.com: domain of tconvertino@gmail.com designates 209.85.220.73 as permitted sender) smtp.mailfrom=tconvertino@gmail.com;
|
||||
dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com;
|
||||
dara=pass header.i=@gmail.com
|
||||
Received: from mail-sor-f73.google.com (mail-sor-f73.google.com. [209.85.220.73])
|
||||
by mx.google.com with SMTPS id ca18e2360f4ac-88711b2248fsor90547939f.5.2025.08.28.12.11.09
|
||||
for <couchmoney@gmail.com>
|
||||
(Google Transport Security);
|
||||
Thu, 28 Aug 2025 12:11:09 -0700 (PDT)
|
||||
Received-SPF: pass (google.com: domain of tconvertino@gmail.com designates 209.85.220.73 as permitted sender) client-ip=209.85.220.73;
|
||||
Authentication-Results: mx.google.com;
|
||||
dkim=pass header.i=@google.com header.s=20230601 header.b=RjBRlfFL;
|
||||
dkim=pass header.i=@gmail.com header.s=20230601 header.b=HaiL0lRL;
|
||||
spf=pass (google.com: domain of tconvertino@gmail.com designates 209.85.220.73 as permitted sender) smtp.mailfrom=tconvertino@gmail.com;
|
||||
dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com;
|
||||
dara=pass header.i=@gmail.com
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=google.com; s=20230601; t=1756408269; x=1757013069; dara=google.com;
|
||||
h=to:from:subject:date:message-id:auto-submitted:sender:reply-to
|
||||
:mime-version:from:to:cc:subject:date:message-id:reply-to;
|
||||
bh=lgr/fFBrye/qM438Us9TAp1/DYWNuYxn2NUL4vzX/SU=;
|
||||
b=RjBRlfFLVsAeeTCwo5Z3c1Y5G+pvz4XSTyHiVKUHmxClmpM30ZeHTVLl36njuM/7rx
|
||||
mFwbzGk80zXgGpZyc7qnhSIVxXeMv4iex2UIc1D7Rcw3CF4q/HPlulcD9uVnsxRvng5Z
|
||||
6PVcBQH3qGn0zvDDb0QHEcuDed4sNd/4wkYMOchxlp1TfdrbMZdCI+EXwTyvGgbVjd+/
|
||||
erPyF5JZL/UJx7+gWoXSE7yJkPQrKYiv4LApu0STV4iSOEL8XsTQ4nZiZHSLeeKr0y7w
|
||||
TUWhjfOCgD/YTZW5PTuFBW+lI03Ny19iGHbQNwKrLLcGwW7TJ2PYBR90vsIfaJtG5RM6
|
||||
MP1w==
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=gmail.com; s=20230601; t=1756408269; x=1757013069; dara=google.com;
|
||||
h=to:from:subject:date:message-id:auto-submitted:sender:reply-to
|
||||
:mime-version:from:to:cc:subject:date:message-id:reply-to;
|
||||
bh=lgr/fFBrye/qM438Us9TAp1/DYWNuYxn2NUL4vzX/SU=;
|
||||
b=HaiL0lRLeUjb1Rw8g5U5npEElUjhuKY2dPzOaldvum7ZqfY26X35u8SQTxCXWcSsGp
|
||||
RKrlHykB6fjjPSjSGBB+uKe98anrorlvgkhUluES0LzmAZ6STVlPUfPHb/RreJQ7Ol1r
|
||||
N7oNIEg5EnGia1g6rWliSMHY7Fb4sQzMaS2P+qhtq0OFzB6F57atJAwTUWaspDHycfdh
|
||||
S8ji+q7DEiLq1LfXIxj+WwenT/iRFIJsfmvXsHgQiKMoYGdENfAGZPdo7W0sTEK3TkWz
|
||||
xFOny/4bQmx/49F4C1HnLsHoBi0j6sezIQsc+U83vvChFXXrELQrK5PiJL+UOCLZo48R
|
||||
RJDQ==
|
||||
X-Google-Smtp-Source: AGHT+IG3ta6ofCYBa0SfJ7K3lq1EjsCnjr+BZDRz/SVLQfyo54CcUFgE5iTTB5E+h//QXT9iTojhKpMp6QZ4QB+5HAcs
|
||||
MIME-Version: 1.0
|
||||
X-Received: by 2002:a05:6602:1544:b0:887:6a2:6054 with SMTP id
|
||||
ca18e2360f4ac-88706a263famr584022039f.9.1756408269509; Thu, 28 Aug 2025
|
||||
12:11:09 -0700 (PDT)
|
||||
Reply-To: tconvertino@gmail.com
|
||||
Sender: Google Calendar <calendar-notification@google.com>
|
||||
Auto-Submitted: auto-generated
|
||||
Message-ID: <calendar-8ecdd8ef-29ed-4f61-857d-1215ab585aba@google.com>
|
||||
Date: Thu, 28 Aug 2025 19:11:09 +0000
|
||||
Subject: New event: Dentist appt @ Tue Sep 23, 2025 3pm - 4pm (PDT) (tconvertino@gmail.com)
|
||||
From: tconvertino@gmail.com
|
||||
To: couchmoney@gmail.com
|
||||
Content-Type: multipart/alternative; boundary="000000000000fc1bff063d71aa4b"
|
||||
X-Spamd-Result: default: False [-0.80 / 15.00];
|
||||
ARC_ALLOW(-1.00)[google.com:s=arc-20240605:i=2];
|
||||
URI_COUNT_ODD(1.00)[1];
|
||||
DMARC_POLICY_ALLOW(-0.50)[gmail.com,none];
|
||||
R_DKIM_ALLOW(-0.20)[google.com:s=20230601,gmail.com:s=20230601];
|
||||
R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36];
|
||||
MIME_BASE64_TEXT(0.10)[];
|
||||
MANY_INVISIBLE_PARTS(0.10)[2];
|
||||
MIME_GOOD(-0.10)[multipart/alternative,text/plain];
|
||||
FREEMAIL_TO(0.00)[gmail.com];
|
||||
RCVD_COUNT_THREE(0.00)[3];
|
||||
FORGED_SENDER(0.00)[tconvertino@gmail.com,couchmoney@gmail.com];
|
||||
FROM_NEQ_ENVFROM(0.00)[tconvertino@gmail.com,couchmoney@gmail.com];
|
||||
MIME_TRACE(0.00)[0:+,1:+,2:~];
|
||||
FREEMAIL_ENVFROM(0.00)[gmail.com];
|
||||
RCPT_COUNT_ONE(0.00)[1];
|
||||
FREEMAIL_REPLYTO(0.00)[gmail.com];
|
||||
FREEMAIL_FROM(0.00)[gmail.com];
|
||||
URIBL_BLOCKED(0.00)[mail-lj1-x230.google.com:rdns,mail-lj1-x230.google.com:helo];
|
||||
TAGGED_FROM(0.00)[caf_=gmail=xinutv];
|
||||
HAS_REPLYTO(0.00)[tconvertino@gmail.com];
|
||||
NEURAL_HAM(-0.00)[-0.995];
|
||||
FWD_GOOGLE(0.00)[couchmoney@gmail.com];
|
||||
TO_DN_NONE(0.00)[];
|
||||
FORGED_SENDER_FORWARDING(0.00)[];
|
||||
RCVD_TLS_LAST(0.00)[];
|
||||
TO_DOM_EQ_FROM_DOM(0.00)[];
|
||||
FROM_NO_DN(0.00)[];
|
||||
ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US];
|
||||
DKIM_TRACE(0.00)[google.com:+,gmail.com:+];
|
||||
MISSING_XM_UA(0.00)[];
|
||||
REPLYTO_EQ_FROM(0.00)[]
|
||||
X-Rspamd-Server: phx
|
||||
X-Rspamd-Action: no action
|
||||
X-Rspamd-Queue-Id: B4E848B007
|
||||
X-TUID: eMNiZ49uiDPB
|
||||
|
||||
--000000000000fc1bff063d71aa4b
|
||||
Content-Type: text/plain; charset="UTF-8"; format=flowed; delsp=yes
|
||||
Content-Transfer-Encoding: base64
|
||||
|
||||
RGVudGlzdCBhcHB0DQpUdWVzZGF5IFNlcCAyMywgMjAyNSDii4UgM3BtIOKAkyA0cG0NClBhY2lm
|
||||
aWMgVGltZSAtIExvcyBBbmdlbGVzDQoNCg0KDQpPcmdhbml6ZXINCnRjb252ZXJ0aW5vQGdtYWls
|
||||
LmNvbQ0KdGNvbnZlcnRpbm9AZ21haWwuY29tDQoNCn5+Ly9+fg0KSW52aXRhdGlvbiBmcm9tIEdv
|
||||
b2dsZSBDYWxlbmRhcjogaHR0cHM6Ly9jYWxlbmRhci5nb29nbGUuY29tL2NhbGVuZGFyLw0KDQpZ
|
||||
b3UgYXJlIHJlY2VpdmluZyB0aGlzIGVtYWlsIGJlY2F1c2UgeW91IGFyZSBzdWJzY3JpYmVkIHRv
|
||||
IGNhbGVuZGFyICANCm5vdGlmaWNhdGlvbnMuIFRvIHN0b3AgcmVjZWl2aW5nIHRoZXNlIGVtYWls
|
||||
cywgZ28gdG8gIA0KaHR0cHM6Ly9jYWxlbmRhci5nb29nbGUuY29tL2NhbGVuZGFyL3Ivc2V0dGlu
|
||||
Z3MsIHNlbGVjdCB0aGlzIGNhbGVuZGFyLCBhbmQgIA0KY2hhbmdlICJPdGhlciBub3RpZmljYXRp
|
||||
b25zIi4NCg0KRm9yd2FyZGluZyB0aGlzIGludml0YXRpb24gY291bGQgYWxsb3cgYW55IHJlY2lw
|
||||
aWVudCB0byBzZW5kIGEgcmVzcG9uc2UgdG8gIA0KdGhlIG9yZ2FuaXplciwgYmUgYWRkZWQgdG8g
|
||||
dGhlIGd1ZXN0IGxpc3QsIGludml0ZSBvdGhlcnMgcmVnYXJkbGVzcyBvZiAgDQp0aGVpciBvd24g
|
||||
aW52aXRhdGlvbiBzdGF0dXMsIG9yIG1vZGlmeSB5b3VyIFJTVlAuDQoNCkxlYXJuIG1vcmUgaHR0
|
||||
cHM6Ly9zdXBwb3J0Lmdvb2dsZS5jb20vY2FsZW5kYXIvYW5zd2VyLzM3MTM1I2ZvcndhcmRpbmcN
|
||||
Cg==
|
||||
--000000000000fc1bff063d71aa4b
|
||||
Content-Type: text/html; charset="UTF-8"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
<!doctype html><html xmlns=3D"http://www.w3.org/1999/xhtml" xmlns:v=3D"urn:="...truncated for brevity...
|
||||
728
server/testdata/google-calendar-example-4.eml
vendored
Normal file
728
server/testdata/google-calendar-example-4.eml
vendored
Normal file
@@ -0,0 +1,728 @@
|
||||
Return-Path: <couchmoney+caf_=gmail=xinu.tv@gmail.com>
|
||||
Delivered-To: bill@xinu.tv
|
||||
Received: from phx.xinu.tv [74.207.253.222]
|
||||
by nixos-01.h.xinu.tv with IMAP (fetchmail-6.5.6)
|
||||
for <wathiede@localhost> (single-drop); Sat, 17 Jan 2026 09:25:58 -0800 (PST)
|
||||
Received: from phx.xinu.tv
|
||||
by phx.xinu.tv with LMTP
|
||||
id YIkZKyXGa2k93xMAJR8clQ
|
||||
(envelope-from <couchmoney+caf_=gmail=xinu.tv@gmail.com>)
|
||||
for <bill@xinu.tv>; Sat, 17 Jan 2026 09:25:57 -0800
|
||||
X-Original-To: gmail@xinu.tv
|
||||
Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48])
|
||||
by phx.xinu.tv (Postfix) with ESMTPS id B744880023
|
||||
for <gmail@xinu.tv>; Sat, 17 Jan 2026 09:25:56 -0800 (PST)
|
||||
Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-59b78886454so3800941e87.2
|
||||
for <gmail@xinu.tv>; Sat, 17 Jan 2026 09:25:56 -0800 (PST)
|
||||
ARC-Seal: i=2; a=rsa-sha256; t=1768670755; cv=pass;
|
||||
d=google.com; s=arc-20240605;
|
||||
b=UCMG36NoEclyVlwzV5KDOA6Fq75afR1kZ6QZQ8A0CR9RJMMEnPEpiuhheiGH7csZWs
|
||||
HEZJmrLtTX/e5qiZ0k5njtm8694d+44YtpWRS54bwcAvwWBeCnHstTFkuOB4J2GWvT6G
|
||||
R9MwX2lwlaGj118bn6aIQTWLB6KyWzUmGdq9AO52fvWTkzlPFDN54/AUYdhx4r+dG5k3
|
||||
tqmDhE87DYIPTtNwYeUZpyEvcKuXYqlRmkHEL+qkixmj6yFX9jReNcHypO3QOj8StGqu
|
||||
H/WKwOSnM5Yupv4EblgGPF8ib8tczyxoi+q73sv7iRtQy8wgyAC1gG6T6/qXuY/+1V1K
|
||||
lyfw==
|
||||
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;
|
||||
h=to:from:subject:date:message-id:auto-submitted:sender:reply-to
|
||||
:mime-version:dkim-signature:dkim-signature:delivered-to;
|
||||
bh=Hw6hGQbUlNGCz02STp2P+s244T5EBOLlXrfxnO0S/+U=;
|
||||
fh=mUux9OA2+hLns/mBVi/4Nr5W8MsoxjQs+3G2LAg1TZo=;
|
||||
b=V+AKgzj8GN/DZNHWPE/MY0blPHHM1Kp85OCTTacCIk/G6dNhx+WmLnIyExrC3i4wmU
|
||||
i62upyA0a18rhHZRhV1FB4oMMhQVroYLKwh5dFuqFtTARua9DgwYeN6YALL9+rr84n2b
|
||||
eZe0txkO5dyJgxByumgOymYFgbevrEtd1GWfK2v1BxtQXzqNZ0SKj5PhVCc5WD+toeHu
|
||||
OEqUuCoHRWpeXYD19OUqv/+MwhPC4t5R5fz8nlPcjxa/fYINuI5+iLhSP7Ki4gzAZFRK
|
||||
T3zMitsxIv/8zKMrhG5K0cm7Nntn2XBT5zrIDURZW9HEKYLww0yJ8qKXPNL+RtbfGgMq
|
||||
TiRw==;
|
||||
darn=xinu.tv
|
||||
ARC-Authentication-Results: i=2; mx.google.com;
|
||||
dkim=pass header.i=@google.com header.s=20230601 header.b=bNGW+EgT;
|
||||
dkim=pass header.i=@gmail.com header.s=20230601 header.b=QfHaLAXu;
|
||||
spf=pass (google.com: domain of tconvertino@gmail.com designates 209.85.220.73 as permitted sender) smtp.mailfrom=tconvertino@gmail.com;
|
||||
dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com;
|
||||
dara=pass header.i=@gmail.com
|
||||
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=1e100.net; s=20230601; t=1768670755; x=1769275555;
|
||||
h=to:from:subject:date:message-id:auto-submitted:sender:reply-to
|
||||
:mime-version:dkim-signature:dkim-signature:delivered-to
|
||||
:x-forwarded-for:x-forwarded-to:x-gm-message-state:from:to:cc
|
||||
:subject:date:message-id:reply-to;
|
||||
bh=Hw6hGQbUlNGCz02STp2P+s244T5EBOLlXrfxnO0S/+U=;
|
||||
b=eTx/TzBvNH8F83uUTAONl5k6vTRn2Id8TE91Mnl0cbJd6GaM9J4DgWVxmBoqfep8nA
|
||||
hN3H5r01YLOdQNWTWmAV2RUrylBtLMQRqW7xeVnIIUKQNXfavZZKaFpwsuudvjDWGKBo
|
||||
zesMFCOaEstK+nCpo/bPurb9kprcOh5y/WZjgL7OqtpnnyzhN6DhkhaYbGetIwW4osj5
|
||||
aCFPOcoMcCYYW8OxEZC6bv2hJzehnV93g8IDY8tBQ88TIf1Kl3uDM8v3oLwMGgmEX+te
|
||||
PYznnWbJF0vG00cWauIsTnjzUt8SSpnaUXw6PXbHlZxn5Roa/l6hg/tuhs699btYOJm/
|
||||
izbQ==
|
||||
X-Forwarded-Encrypted: i=2; AJvYcCUWtYAXLj/f6NFhD1jVOvyY1Jd5fsiQkXHwDFfYixYixyUvud2GXNENdLwj08ultHSVt74PwA==@xinu.tv
|
||||
X-Gm-Message-State: AOJu0Yx6pI6AZXNq1lGFocBmt39kF0MuPDwo3WPcPrcCg8s1e8EF0iF0
|
||||
0jOlOq3z4d3WKZqbpCpMIczBtHf5wHUzS1TFiPfYcoHfhnoxLm+dVYhdf0B5b39G2NSwnHIRAcZ
|
||||
HPVGwj7Cl8dNJOMBLPOevH4CYTDEubbDxDmQOvWE0bhVDk2P+UIU53lYzGkLCnQ==
|
||||
X-Received: by 2002:a05:6512:4016:b0:59b:7888:62c8 with SMTP id 2adb3069b0e04-59baeed63a1mr2407719e87.33.1768670754691;
|
||||
Sat, 17 Jan 2026 09:25:54 -0800 (PST)
|
||||
X-Forwarded-To: gmail@xinu.tv
|
||||
X-Forwarded-For: couchmoney@gmail.com gmail@xinu.tv
|
||||
Delivered-To: couchmoney@gmail.com
|
||||
Received: by 2002:a05:6504:2382:b0:2d3:710a:2457 with SMTP id h2csp2362813lty;
|
||||
Sat, 17 Jan 2026 09:25:53 -0800 (PST)
|
||||
X-Received: by 2002:a05:6808:4f0e:b0:450:ac57:48a7 with SMTP id 5614622812f47-45c9c14fc0fmr2557499b6e.59.1768670753179;
|
||||
Sat, 17 Jan 2026 09:25:53 -0800 (PST)
|
||||
ARC-Seal: i=1; a=rsa-sha256; t=1768670753; cv=none;
|
||||
d=google.com; s=arc-20240605;
|
||||
b=V+T4U8NWyAR1p4yC5XY/I8vxXwtdkLXkIEO6gNBVvJyYi4XbjMMEnoRPAqOULwONFT
|
||||
7q1V9vArMoZrvS4GNL3dg05tLr0Ug+Frm39+Vp1Wp3UxhQ/yxiby8jhRYkMyaKLZxhR3
|
||||
2kihw8UgFjdUteHHwKoTDnIkTeKrMKZK8N4bTEzf9LoIXHMZcVaeC5XItuuOUdX6TPXr
|
||||
xEQKfzCfz3UHY1piusFov9YIr8iBLGnNp6bXJqbRKmnLhOGkt9HQOT9rBl1nmBg5bqQj
|
||||
4qxTu8Le/CE5qljInXX5iXNYXp1eMD1G6PZ9Hah1hr/wen1VPM6ysNynBlDzlNQUyEMJ
|
||||
8lNw==
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;
|
||||
h=to:from:subject:date:message-id:auto-submitted:sender:reply-to
|
||||
:mime-version:dkim-signature:dkim-signature;
|
||||
bh=Hw6hGQbUlNGCz02STp2P+s244T5EBOLlXrfxnO0S/+U=;
|
||||
fh=mbzrMIWIgWMC0ni1xEx+ViW4J0RLAdLdPT2cX81nTlk=;
|
||||
b=UhcC2/PG/1T8wb5AzN1QNoaEXR7rs82O/P2CXN7vMVR9JoE3selJIzwIpyWxuKDPK3
|
||||
GQtEmc8Bqcvcqu//9mWJxsklCkxSXrYnJ0UvykvbmZT7xPhM4r2mpWPluvfxLfEEdbqg
|
||||
aNgJM1bn4QoYvnjmIF638/SN9dK5TI9seZ04BzbqQxd7Vw5OeccovSpPerSP7ya7l+4k
|
||||
wOHhvP4mAlB/0bUae8xN/bqS0SIgy+V+cRr3tYEsRb21gJgTT757rHIV0aQu5LSO9t2N
|
||||
UilB/hh4qvPhaCWmj6I+30ZYD02m9WKPYkwteLA9NXtggMw9WGeywxPZ//pHazzbq7iQ
|
||||
im+A==;
|
||||
dara=google.com
|
||||
ARC-Authentication-Results: i=1; mx.google.com;
|
||||
dkim=pass header.i=@google.com header.s=20230601 header.b=bNGW+EgT;
|
||||
dkim=pass header.i=@gmail.com header.s=20230601 header.b=QfHaLAXu;
|
||||
spf=pass (google.com: domain of tconvertino@gmail.com designates 209.85.220.73 as permitted sender) smtp.mailfrom=tconvertino@gmail.com;
|
||||
dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com;
|
||||
dara=pass header.i=@gmail.com
|
||||
Received: from mail-sor-f73.google.com (mail-sor-f73.google.com. [209.85.220.73])
|
||||
by mx.google.com with SMTPS id 5614622812f47-45c9e03dfa5sor2738469b6e.10.2026.01.17.09.25.53
|
||||
for <couchmoney@gmail.com>
|
||||
(Google Transport Security);
|
||||
Sat, 17 Jan 2026 09:25:53 -0800 (PST)
|
||||
Received-SPF: pass (google.com: domain of tconvertino@gmail.com designates 209.85.220.73 as permitted sender) client-ip=209.85.220.73;
|
||||
Authentication-Results: mx.google.com;
|
||||
dkim=pass header.i=@google.com header.s=20230601 header.b=bNGW+EgT;
|
||||
dkim=pass header.i=@gmail.com header.s=20230601 header.b=QfHaLAXu;
|
||||
spf=pass (google.com: domain of tconvertino@gmail.com designates 209.85.220.73 as permitted sender) smtp.mailfrom=tconvertino@gmail.com;
|
||||
dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com;
|
||||
dara=pass header.i=@gmail.com
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=google.com; s=20230601; t=1768670752; x=1769275552; dara=google.com;
|
||||
h=to:from:subject:date:message-id:auto-submitted:sender:reply-to
|
||||
:mime-version:from:to:cc:subject:date:message-id:reply-to;
|
||||
bh=Hw6hGQbUlNGCz02STp2P+s244T5EBOLlXrfxnO0S/+U=;
|
||||
b=bNGW+EgTmg1v7auBVBEmmFGyg6QDqI536axgkCb2SIiknIljcxZLx2KR0hrFlA3lSz
|
||||
Z89Q1JdMU37Tx8upXXkAQYBe0A42UgQjXEYYfjykMl/PNg7XppVWzevLwkKLmmr/dZ7f
|
||||
YMcE1DQogEr3RNXJeD92NfJxyOQGskvnzb4rhy22QonzF2UyGy/QX2UtFSz1cZi+35Yq
|
||||
vTkaernNWU3hf5pAXigHisJTtoJeTRgVNY4ch+gru1X1LmZZzrTgWt6e7hGtsbvlV7cZ
|
||||
CBM8gqf1LrVLV0Y1PdvS50yack5EFKbyKtmQWAwHBlOABVDwPHbPD9/6N4973C9juedx
|
||||
HnNg==
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=gmail.com; s=20230601; t=1768670753; x=1769275553; dara=google.com;
|
||||
h=to:from:subject:date:message-id:auto-submitted:sender:reply-to
|
||||
:mime-version:from:to:cc:subject:date:message-id:reply-to;
|
||||
bh=Hw6hGQbUlNGCz02STp2P+s244T5EBOLlXrfxnO0S/+U=;
|
||||
b=QfHaLAXuHdf594PTfEIjd3XOTBUaUaqHXtEArT1QZBEi1Vpf8NyYD6cPKPbjnln3CZ
|
||||
q5s/sBjI6bmtszfVecPTEv3SEnFgQqQS/PCw3YbMNteemsw4rDNccwV6DSiX/BYMRZIM
|
||||
4HEgMoLbXrlMlFnjEpWkfb7Kon5Y39C2DNx3sZ3TX/s8fLgYC8JpdUXdZ+LRlr8QzoNH
|
||||
VLvVwW2iBYOzX9QdBtLdghvnmgvuSxIq1xB0zQNvDixOuG/egq1nDjHna4T75W8qzNEq
|
||||
+hl8Rng1G2oqWAWUASkwSRvrUvV/NJA3gE+tGD2Isj9d/r4Ppll4jBWOu7KVRPM8Yrld
|
||||
MYcg==
|
||||
MIME-Version: 1.0
|
||||
X-Received: by 2002:a05:6820:1993:b0:65f:67b7:95c2 with SMTP id
|
||||
006d021491bc7-661179f382fmr2914920eaf.55.1768670752809; Sat, 17 Jan 2026
|
||||
09:25:52 -0800 (PST)
|
||||
Reply-To: tconvertino@gmail.com
|
||||
Sender: Google Calendar <calendar-notification@google.com>
|
||||
Auto-Submitted: auto-generated
|
||||
Message-ID: <calendar-c95e83d6-7062-41ea-8c57-5b7bc2a79c76@google.com>
|
||||
Date: Sat, 17 Jan 2026 17:25:52 +0000
|
||||
Subject: New event: Emery Sleeps Over @ Sun Jan 18, 2026 (tconvertino@gmail.com)
|
||||
From: tconvertino@gmail.com
|
||||
To: couchmoney@gmail.com
|
||||
Content-Type: multipart/alternative; boundary="000000000000f22916064898bf45"
|
||||
X-Rspamd-Queue-Id: B744880023
|
||||
X-Rspamd-Server: phx
|
||||
X-Spamd-Result: default: False [-0.90 / 15.00];
|
||||
URI_COUNT_ODD(1.00)[1];
|
||||
ARC_ALLOW(-1.00)[google.com:s=arc-20240605:i=2];
|
||||
DMARC_POLICY_ALLOW(-0.50)[gmail.com,none];
|
||||
R_DKIM_ALLOW(-0.20)[google.com:s=20230601,gmail.com:s=20230601];
|
||||
R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17];
|
||||
MANY_INVISIBLE_PARTS(0.10)[2];
|
||||
MIME_GOOD(-0.10)[multipart/alternative,text/plain];
|
||||
FREEMAIL_TO(0.00)[gmail.com];
|
||||
RCVD_COUNT_THREE(0.00)[3];
|
||||
RCVD_TLS_LAST(0.00)[];
|
||||
FORGED_SENDER(0.00)[tconvertino@gmail.com,couchmoney@gmail.com];
|
||||
RCPT_COUNT_ONE(0.00)[1];
|
||||
RCVD_IN_DNSWL_NONE(0.00)[209.85.220.73:received];
|
||||
TAGGED_FROM(0.00)[caf_=gmail=xinutv];
|
||||
FREEMAIL_REPLYTO(0.00)[gmail.com];
|
||||
MIME_TRACE(0.00)[0:+,1:+,2:~];
|
||||
FREEMAIL_FROM(0.00)[gmail.com];
|
||||
FROM_NEQ_ENVFROM(0.00)[tconvertino@gmail.com,couchmoney@gmail.com];
|
||||
MISSING_XM_UA(0.00)[];
|
||||
HAS_REPLYTO(0.00)[tconvertino@gmail.com];
|
||||
DNSWL_BLOCKED(0.00)[209.85.167.48:from];
|
||||
DWL_DNSWL_NONE(0.00)[gmail.com:dkim];
|
||||
TO_DN_NONE(0.00)[];
|
||||
FREEMAIL_ENVFROM(0.00)[gmail.com];
|
||||
FORGED_SENDER_FORWARDING(0.00)[];
|
||||
DKIM_TRACE(0.00)[google.com:+,gmail.com:+];
|
||||
DWL_DNSWL_BLOCKED(0.00)[google.com:dkim];
|
||||
TO_DOM_EQ_FROM_DOM(0.00)[];
|
||||
FROM_NO_DN(0.00)[];
|
||||
FWD_GOOGLE(0.00)[couchmoney@gmail.com];
|
||||
ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US];
|
||||
RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.48:from];
|
||||
REPLYTO_EQ_FROM(0.00)[]
|
||||
X-Rspamd-Action: no action
|
||||
X-TUID: GNj+V6W3PxE3
|
||||
|
||||
--000000000000f22916064898bf45
|
||||
Content-Type: text/plain; charset="UTF-8"; format=flowed; delsp=yes
|
||||
|
||||
Emery Sleeps Over
|
||||
Sunday Jan 18, 2026
|
||||
|
||||
|
||||
|
||||
Organizer
|
||||
tconvertino@gmail.com
|
||||
tconvertino@gmail.com
|
||||
|
||||
~~//~~
|
||||
Invitation from Google Calendar: https://calendar.google.com/calendar/
|
||||
|
||||
You are receiving this email because you are subscribed to calendar
|
||||
notifications. To stop receiving these emails, go to
|
||||
https://calendar.google.com/calendar/r/settings, select this calendar, and
|
||||
change "Other notifications".
|
||||
|
||||
Forwarding this invitation could allow any recipient to send a response to
|
||||
the organizer, be added to the guest list, invite others regardless of
|
||||
their own invitation status, or modify your RSVP.
|
||||
|
||||
Learn more https://support.google.com/calendar/answer/37135#forwarding
|
||||
|
||||
--000000000000f22916064898bf45
|
||||
Content-Type: text/html; charset="UTF-8"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
<!doctype html><html xmlns=3D"http://www.w3.org/1999/xhtml" xmlns:v=3D"urn:=
|
||||
schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-microsoft-com:office:offi=
|
||||
ce"><head><title></title><!--[if !mso]><meta http-equiv=3D"X-UA-Compatible"=
|
||||
content=3D"IE=3Dedge"><![endif]--><meta http-equiv=3D"Content-Type" conten=
|
||||
t=3D"text/html; charset=3DUTF-8"><meta name=3D"viewport" content=3D"width=
|
||||
=3Ddevice-width,initial-scale=3D1"><meta name=3D"color-scheme" content=3D"l=
|
||||
ight dark"><meta name=3D"supported-color-schemes" content=3D"light dark">
|
||||
<style>
|
||||
body, html {
|
||||
font-family: Roboto, Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-ms-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
#outlook a {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.ReadMsgBody {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.ExternalClass {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.ExternalClass * {
|
||||
line-height: 100%;
|
||||
}
|
||||
|
||||
table,
|
||||
td {
|
||||
mso-table-lspace: 0pt;
|
||||
mso-table-rspace: 0pt;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
height: auto;
|
||||
line-height: 100%;
|
||||
outline: none;
|
||||
text-decoration: none;
|
||||
-ms-interpolation-mode: bicubic;
|
||||
}
|
||||
|
||||
p {
|
||||
display: block;
|
||||
margin: 13px 0;
|
||||
}
|
||||
</style>
|
||||
<!--[if !mso]><!-->
|
||||
<style>
|
||||
@media only screen and (max-width:580px) {
|
||||
@-ms-viewport {
|
||||
width: 320px;
|
||||
}
|
||||
|
||||
@viewport {
|
||||
width: 320px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<!--<![endif]-->
|
||||
<!--[if mso]>
|
||||
<xml>
|
||||
<o:OfficeDocumentSettings>
|
||||
<o:AllowPNG/>
|
||||
<o:PixelsPerInch>96</o:PixelsPerInch>
|
||||
</o:OfficeDocumentSettings>
|
||||
</xml>
|
||||
<![endif]-->
|
||||
<!--[if lte mso 11]>
|
||||
<style>
|
||||
.outlook-group-fix { width:100% !important; }
|
||||
</style>
|
||||
<![endif]-->
|
||||
|
||||
<!--[if !mso]><!-- -->
|
||||
<style>body, html {font-family:Roboto,Helvetica,Arial,sans-serif;}@font-f=
|
||||
ace {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-stretch: normal;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v48/KFOMCnqEu92Fr1ME7kSn66aGLdTylUA=
|
||||
MQXC89YmC2DPNWubEbVmUiA8.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-stretch: normal;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v48/KFOMCnqEu92Fr1ME7kSn66aGLdTylUA=
|
||||
MQXC89YmC2DPNWub2bVmUiA8.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-stretch: normal;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v48/KFOMCnqEu92Fr1ME7kSn66aGLdTylUA=
|
||||
MQXC89YmC2DPNWuYjalmUiA8.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Material Icons Extended';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(//fonts.gstatic.com/s/materialiconsextended/v154/kJEjBvgX7BgnkSr=
|
||||
UwT8UnLVc38YydejYY-oE_LvM.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Google Material Icons';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(//fonts.gstatic.com/s/googlematerialicons/v144/Gw6kwdfw6UnXLJCcm=
|
||||
afZyFRXb3BL9rvi0QZG3g.otf) format('opentype');
|
||||
}
|
||||
|
||||
.google-material-icons {
|
||||
font-family: 'Google Material Icons';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
letter-spacing: normal;
|
||||
text-transform: none;
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
word-wrap: normal;
|
||||
direction: ltr;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Google Material Icons Filled';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(//fonts.gstatic.com/s/googlematerialiconsfilled/v118/WWXFlimHYg6=
|
||||
HKI3TavMkbKdhBmDvgach8TVpeGsuueSZJH4.otf) format('opentype');
|
||||
}
|
||||
|
||||
.google-material-icons-filled {
|
||||
font-family: 'Google Material Icons Filled';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
letter-spacing: normal;
|
||||
text-transform: none;
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
word-wrap: normal;
|
||||
direction: ltr;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Google Sans';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(//fonts.gstatic.com/s/googlesans/v14/4UaGrENHsxJlGDuGo1OIlL3Owps=
|
||||
.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Google Sans';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
src: url(//fonts.gstatic.com/s/googlesans/v14/4UabrENHsxJlGDuGo1OIlLU94Yt=
|
||||
zCwM.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Google Sans';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: url(//fonts.gstatic.com/s/googlesans/v14/4UabrENHsxJlGDuGo1OIlLV154t=
|
||||
zCwM.ttf) format('truetype');
|
||||
}
|
||||
</style><!--<![endif]-->
|
||||
<style>
|
||||
.body-container {
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
}
|
||||
</style>
|
||||
=20
|
||||
<style>
|
||||
u+.body .body-container,
|
||||
body[data-outlook-cycle] .body-container,
|
||||
#MessageViewBody .body-container {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
</style>
|
||||
=20
|
||||
<style>
|
||||
@media only screen and (min-width:580px) {
|
||||
.column-per-37 {
|
||||
width: 37% !important;
|
||||
max-width: 37%;
|
||||
}
|
||||
|
||||
.column-per-63 {
|
||||
width: 63% !important;
|
||||
max-width: 63%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
=20
|
||||
<style>
|
||||
.appointment-buttons th {
|
||||
display: block;
|
||||
clear: both;
|
||||
float: left;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.appointment-buttons th a {
|
||||
float: left;
|
||||
}
|
||||
|
||||
#MessageViewBody .appointment-buttons th {
|
||||
margin-top: 24px;
|
||||
}
|
||||
</style>
|
||||
=20
|
||||
<style>
|
||||
@media only screen and (max-width:580px) {
|
||||
table.full-width-mobile {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
td.full-width-mobile {
|
||||
width: auto !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.main-container-inner,
|
||||
.info-bar-inner {
|
||||
padding: 12px 16px !important;
|
||||
}
|
||||
|
||||
.main-column-table-ltr {
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
|
||||
.main-column-table-rtl {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
@media only screen and (min-width:580px) {
|
||||
.main-container-inner {
|
||||
padding: 24px 32px !important;
|
||||
}
|
||||
|
||||
.info-bar-inner {
|
||||
padding: 12px 32px !important;
|
||||
}
|
||||
|
||||
.main-column-table-ltr {
|
||||
padding-right: 32px !important;
|
||||
}
|
||||
|
||||
.main-column-table-rtl {
|
||||
padding-left: 32px !important;
|
||||
}
|
||||
|
||||
.appointment-buttons th {
|
||||
display: table-cell;
|
||||
clear: none;
|
||||
}
|
||||
}
|
||||
|
||||
.primary-text {
|
||||
color: #3c4043 !important;
|
||||
}
|
||||
|
||||
.secondary-text,
|
||||
.phone-number a {
|
||||
color: #70757a !important;
|
||||
}
|
||||
|
||||
.accent-text {
|
||||
color: #1a73e8 !important;
|
||||
}
|
||||
|
||||
.accent-text-dark {
|
||||
color: #185abc !important;
|
||||
}
|
||||
|
||||
.grey-button-text,
|
||||
.attachment-chip a {
|
||||
color: #5f6368 !important;
|
||||
}
|
||||
|
||||
.primary-button {
|
||||
background-color: #1a73e8 !important;
|
||||
}
|
||||
|
||||
.primary-button-text {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.underline-on-hover:hover {
|
||||
text-decoration: underline !important;
|
||||
}
|
||||
|
||||
.grey-infobar-text {
|
||||
color: #202124 !important;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.primary-text:not([class^=3D"x_"]) {
|
||||
color: #e8eaed !important;
|
||||
}
|
||||
|
||||
.secondary-text:not([class^=3D"x_"]),
|
||||
.phone-number:not([class^=3D"x_"]) a {
|
||||
color: #9aa0a6 !important;
|
||||
}
|
||||
|
||||
.grey-button-text:not([class^=3D"x_"]),
|
||||
.attachment-chip:not([class^=3D"x_"]) a {
|
||||
color: #bdc1c6 !important;
|
||||
}
|
||||
|
||||
.accent-text:not([class^=3D"x_"]),
|
||||
.hairline-button-text:not([class^=3D"x_"]) {
|
||||
color: #8ab4f8 !important;
|
||||
}
|
||||
|
||||
.primary-button:not([class^=3D"x_"]) {
|
||||
background-color: #8ab4f8 !important;
|
||||
}
|
||||
|
||||
.primary-button-text:not([class^=3D"x_"]) {
|
||||
color: #202124 !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.cse-banner:not([class^=3D"x_"]) {
|
||||
background-color: #3c4043 !important; /* Google Grey 800 */
|
||||
}
|
||||
|
||||
.encryption-icon:not([class^=3D"x_"]) {
|
||||
/* WARNING: This causes the whole style tag to get stripped in Gm=
|
||||
ail. */
|
||||
background-image: url('https://fonts.gstatic.com/s/i/googlemateri=
|
||||
aliconsfilled/encrypted/v3/gm_grey200-24dp/2x/gm_filled_encrypted_gm_grey20=
|
||||
0_24dp.png') !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<!--[if !mso]><!-->
|
||||
<style>
|
||||
.prevent-link a {
|
||||
color: inherit !important;
|
||||
text-decoration: none !important;
|
||||
font-size: inherit !important;
|
||||
font-family: inherit !important;
|
||||
font-weight: inherit !important;
|
||||
line-height: inherit !important;
|
||||
}
|
||||
</style>
|
||||
<!--<![endif]-->
|
||||
|
||||
<!--[if mso | IE]>
|
||||
<style>
|
||||
.main-container-inner {
|
||||
padding: 24px 32px !important;
|
||||
}
|
||||
|
||||
.info-bar-inner {
|
||||
padding: 12px 32px !important;
|
||||
}
|
||||
|
||||
.cse-banner .encryption-icon {
|
||||
/* We use the IE workaround instead. */
|
||||
background-image: none !important;
|
||||
}
|
||||
|
||||
.cse-banner .encryption-icon .ms-fallback {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
/* NB: Some MS clients ignore dark-scheme styling and apply their o=
|
||||
wn, so there's nothing we can do to help there. */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.cse-banner:not([class^=3D"x_"]) .encryption-icon .ms-fallback {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.cse-banner:not([class^=3D"x_"]) .encryption-icon .ms-fallback-da=
|
||||
rk {
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<![endif]-->
|
||||
</head><body class=3D"body"><span itemscope itemtype=3D"http://schema.org=
|
||||
/InformAction"><span style=3D"display:none" itemprop=3D"about" itemscope it=
|
||||
emtype=3D"http://schema.org/Person"><meta itemprop=3D"description" content=
|
||||
=3D"Invitation from tconvertino@gmail.com"/></span><span itemprop=3D"object=
|
||||
" itemscope itemtype=3D"http://schema.org/Event"><meta itemprop=3D"eventSta=
|
||||
tus" content=3D"http://schema.org/EventScheduled"/><span itemprop=3D"publis=
|
||||
her" itemscope itemtype=3D"http://schema.org/Organization"><meta itemprop=
|
||||
=3D"name" content=3D"Google Calendar"/></span><meta itemprop=3D"eventId/goo=
|
||||
gleCalendar" content=3D"7bsl09rb144q35feflbl0q2v58"/><span style=3D"display=
|
||||
: none; font-size: 1px; color: #fff; line-height: 1px; height: 0; max-heigh=
|
||||
t: 0; width: 0; max-width: 0; opacity: 0; overflow: hidden;" itemprop=3D"na=
|
||||
me">Emery Sleeps Over</span><meta itemprop=3D"url" content=3D"https://calen=
|
||||
dar.google.com/calendar/r?eid=3DN2JzbDA5cmIxNDRxMzVmZWZsYmwwcTJ2NTggdGNvbnZ=
|
||||
lcnRpbm9AbQ&es=3D1"/><span aria-hidden=3D"true"><time itemprop=3D"start=
|
||||
Date" datetime=3D"20260118"></time><time itemprop=3D"endDate" datetime=3D"2=
|
||||
0260119"></time></span><div style=3D"display: none; font-size: 1px; color: =
|
||||
#fff; line-height: 1px; height: 0; max-height: 0; width: 0; max-width: 0; o=
|
||||
pacity: 0; overflow: hidden;">You have been invited by tconvertino@gmail.co=
|
||||
m to attend an event named Emery Sleeps Over on Sunday Jan 18, 2026.</div><=
|
||||
table border=3D"0" cellpadding=3D"0" cellspacing=3D"0" role=3D"presentation=
|
||||
" align=3D"center" style=3D"width:100%;" class=3D"body-container"><tbody><t=
|
||||
r><td style=3D"" class=3D"" align=3D"left"><!--[if mso | IE]><table border=
|
||||
=3D"0" cellpadding=3D"0" cellspacing=3D"0" role=3D"presentation"><tr><td he=
|
||||
ight=3D"16" style=3D"height:16px;"><![endif]--><div style=3D"height:16px;" =
|
||||
aria-hidden=3D"true"> </div><!--[if mso | IE]></td></tr></table><![e=
|
||||
ndif]--><table border=3D"0" cellpadding=3D"0" cellspacing=3D"0" role=3D"pre=
|
||||
sentation" align=3D"center" style=3D"width:100%;" class=3D""><tbody><tr><td=
|
||||
style=3D"border: solid 1px #dadce0; border-radius: 8px; direction: rtl; fo=
|
||||
nt-size: 0; padding: 24px 32px; text-align: left; vertical-align: top;" cla=
|
||||
ss=3D"main-container-inner"><!--[if mso | IE]><table border=3D"0" cellpaddi=
|
||||
ng=3D"0" cellspacing=3D"0" role=3D"presentation"><tr><![endif]--><div class=
|
||||
=3D"" style=3D"font-size: 13px; text-align: left; direction: ltr; display: =
|
||||
inline-block; vertical-align: top; width: 100%;overflow: hidden; word-wrap:=
|
||||
break-word;"><table border=3D"0" cellpadding=3D"0" cellspacing=3D"0" role=
|
||||
=3D"presentation" width=3D"100%" class=3D"main-column-table-ltr" style=3D"p=
|
||||
adding-right: 32px; padding-left: 0;;table-layout: fixed;"><tbody><tr><td c=
|
||||
lass=3D"main-column-td" style=3D"padding:0; vertical-align:top;"><table bor=
|
||||
der=3D"0" cellpadding=3D"0" cellspacing=3D"0" role=3D"presentation" width=
|
||||
=3D"100%" style=3D"table-layout: fixed;"><tr><td style=3D"font-size: 0; pad=
|
||||
ding: 0; text-align: left; word-break: break-word;;padding-bottom:24px;"><d=
|
||||
iv style=3D"font-family: Roboto, sans-serif;font-style: normal; font-weight=
|
||||
: 400; font-size: 14px; line-height: 20px; letter-spacing: 0.2px;color: #3c=
|
||||
4043; text-decoration: none;" class=3D"primary-text" role=3D"presentation">=
|
||||
<span aria-hidden=3D"true"><time itemprop=3D"startDate" datetime=3D"2026011=
|
||||
8"></time><time itemprop=3D"endDate" datetime=3D"20260119"></time></span><t=
|
||||
able border=3D"0" cellpadding=3D"0" cellspacing=3D"0" role=3D"presentation"=
|
||||
style=3D"padding-bottom: 4px;"><tr><td><h2 class=3D"primary-text" style=3D=
|
||||
"font-size: 14px;color: #3c4043; text-decoration: none;font-weight: 700;-we=
|
||||
bkit-font-smoothing: antialiased;margin: 0; padding: 0;">When</h2></td></tr=
|
||||
></table><span>Sunday Jan 18, 2026</span></div></td></tr><tr><td style=3D"f=
|
||||
ont-size: 0; padding: 0; text-align: left; word-break: break-word;;padding-=
|
||||
bottom:24px;"><div style=3D"font-family: Roboto, sans-serif;font-style: nor=
|
||||
mal; font-weight: 400; font-size: 14px; line-height: 20px; letter-spacing: =
|
||||
0.2px;color: #3c4043; text-decoration: none;" class=3D"primary-text" role=
|
||||
=3D"presentation"><table border=3D"0" cellpadding=3D"0" cellspacing=3D"0" r=
|
||||
ole=3D"presentation" style=3D"padding-bottom: 4px;"><tr><td><h2 class=3D"pr=
|
||||
imary-text" style=3D"font-size: 14px;color: #3c4043; text-decoration: none;=
|
||||
font-weight: 700;-webkit-font-smoothing: antialiased;margin: 0; padding: 0;=
|
||||
">Calendar</h2></td></tr></table>tconvertino@gmail.com</div></td></tr><tr><=
|
||||
td style=3D"font-size: 0; padding: 0; text-align: left; word-break: break-w=
|
||||
ord;;padding-bottom:24px;"><div style=3D"font-family: Roboto, sans-serif;fo=
|
||||
nt-style: normal; font-weight: 400; font-size: 14px; line-height: 20px; let=
|
||||
ter-spacing: 0.2px;color: #3c4043; text-decoration: none;" class=3D"primary=
|
||||
-text" role=3D"presentation"><table border=3D"0" cellpadding=3D"0" cellspac=
|
||||
ing=3D"0" role=3D"presentation" style=3D"padding-bottom: 4px;"><tr><td><h2 =
|
||||
class=3D"primary-text" style=3D"font-size: 14px;color: #3c4043; text-decora=
|
||||
tion: none;font-weight: 700;-webkit-font-smoothing: antialiased;margin: 0; =
|
||||
padding: 0;">Organizer</h2></td></tr></table><div style=3D"color: #3c4042;"=
|
||||
><span class=3D"notranslate"><a class=3D"primary-text underline-on-hover" s=
|
||||
tyle=3D"display: inline-block;;color: #3c4043; text-decoration: none;" href=
|
||||
=3D"mailto:tconvertino@gmail.com">tconvertino@gmail.com</a></span><span ite=
|
||||
mprop=3D"organizer" itemscope itemtype=3D"http://schema.org/Person"><meta i=
|
||||
temprop=3D"name" content=3D"tconvertino@gmail.com"/><meta itemprop=3D"email=
|
||||
" content=3D"tconvertino@gmail.com"/></span></div></div></td></tr><tr><td s=
|
||||
tyle=3D"font-size: 0; padding: 0; text-align: left; word-break: break-word;=
|
||||
;padding-bottom:24px;"><div style=3D"font-family: Roboto, sans-serif;font-s=
|
||||
tyle: normal; font-weight: 400; font-size: 14px; line-height: 20px; letter-=
|
||||
spacing: 0.2px;color: #3c4043; text-decoration: none;" class=3D"primary-tex=
|
||||
t" role=3D"presentation"><table border=3D"0" cellpadding=3D"0" cellspacing=
|
||||
=3D"0" role=3D"presentation" style=3D"padding-bottom: 4px;"><tr><td><h2 cla=
|
||||
ss=3D"primary-text" style=3D"font-size: 14px;color: #3c4043; text-decoratio=
|
||||
n: none;font-weight: 700;-webkit-font-smoothing: antialiased;margin: 0; pad=
|
||||
ding: 0;">Guests</h2></td></tr></table><div style=3D"padding-bottom: 4px; t=
|
||||
ext-align: left;;color: #3c4042;"></div><a href=3D"https://calendar.google.=
|
||||
com/calendar/r?eid=3DN2JzbDA5cmIxNDRxMzVmZWZsYmwwcTJ2NTggdGNvbnZlcnRpbm9AbQ=
|
||||
&es=3D1" style=3D"display: inline-block;;color: #1a73e8; text-decoratio=
|
||||
n: none;font-weight: 700;" target=3D"_blank" class=3D"accent-text underline=
|
||||
-on-hover">View all guest info</a></div></td></tr></table></td></tr></tbody=
|
||||
></table></div><!--[if mso | IE]></tr></table><![endif]--></td></tr></tbody=
|
||||
></table><table border=3D"0" cellpadding=3D"0" cellspacing=3D"0" role=3D"pr=
|
||||
esentation" align=3D"center" style=3D"width:100%;" class=3D""><tbody><tr><t=
|
||||
d style=3D"font-size: 0; padding: 0; text-align: left; word-break: break-wo=
|
||||
rd;;padding:4px 12px;" class=3D"" align=3D"left"><div class=3D"secondary-te=
|
||||
xt" style=3D"color: #70757a; text-decoration: none;font-family: Roboto, san=
|
||||
s-serif;font-size: 12px; line-height: 16px; mso-line-height-rule: exactly; =
|
||||
text-align: left;"><p>Invitation from <a href=3D"https://calendar.google.co=
|
||||
m/calendar/" class=3D"accent-text underline-on-hover" style=3D"font-family:=
|
||||
Roboto, sans-serif;font-size: 12px; line-height: 16px; mso-line-height-rul=
|
||||
e: exactly;;color: #1a73e8; text-decoration: none;" target=3D"_blank">Googl=
|
||||
e Calendar</a></p><p>You are receiving this email because you are subscribe=
|
||||
d to calendar notifications. To stop receiving these emails, go to <a href=
|
||||
=3D"https://calendar.google.com/calendar/r/settings" class=3D"accent-text u=
|
||||
nderline-on-hover" style=3D"font-family: Roboto, sans-serif;font-size: 12px=
|
||||
; line-height: 16px; mso-line-height-rule: exactly;;color: #1a73e8; text-de=
|
||||
coration: none;" target=3D"_blank">Calendar settings</a>, select this calen=
|
||||
dar, and change "Other notifications".</p><p>Forwarding this invitation cou=
|
||||
ld allow any recipient to send a response to the organizer, be added to the=
|
||||
guest list, invite others regardless of their own invitation status, or mo=
|
||||
dify your RSVP. <a class=3D"accent-text underline-on-hover" style=3D"font-f=
|
||||
amily: Roboto, sans-serif;font-size: 12px; line-height: 16px; mso-line-heig=
|
||||
ht-rule: exactly;;color: #1a73e8; text-decoration: none;" href=3D"https://s=
|
||||
upport.google.com/calendar/answer/37135#forwarding">Learn more</a></p></div=
|
||||
></td></tr></tbody></table></td></tr></tbody></table></span></span></body><=
|
||||
/html>
|
||||
--000000000000f22916064898bf45--
|
||||
733
server/testdata/google-calendar-example-5.eml
vendored
Normal file
733
server/testdata/google-calendar-example-5.eml
vendored
Normal file
@@ -0,0 +1,733 @@
|
||||
Return-Path: <couchmoney+caf_=gmail=xinu.tv@gmail.com>
|
||||
Delivered-To: bill@xinu.tv
|
||||
Received: from phx.xinu.tv [74.207.253.222]
|
||||
by nixos-01.h.xinu.tv with IMAP (fetchmail-6.5.6)
|
||||
for <wathiede@localhost> (single-drop); Sat, 17 Jan 2026 07:15:51 -0800 (PST)
|
||||
Received: from phx.xinu.tv
|
||||
by phx.xinu.tv with LMTP
|
||||
id EBhFKaana2lD2BMAJR8clQ
|
||||
(envelope-from <couchmoney+caf_=gmail=xinu.tv@gmail.com>)
|
||||
for <bill@xinu.tv>; Sat, 17 Jan 2026 07:15:50 -0800
|
||||
X-Original-To: gmail@xinu.tv
|
||||
Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47])
|
||||
by phx.xinu.tv (Postfix) with ESMTPS id 9ED9E80023
|
||||
for <gmail@xinu.tv>; Sat, 17 Jan 2026 07:15:49 -0800 (PST)
|
||||
Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-59b72a1e2f0so3298670e87.0
|
||||
for <gmail@xinu.tv>; Sat, 17 Jan 2026 07:15:49 -0800 (PST)
|
||||
ARC-Seal: i=2; a=rsa-sha256; t=1768662948; cv=pass;
|
||||
d=google.com; s=arc-20240605;
|
||||
b=P8ukIhKVppSoOtIG2772uR9xtbgbpQjTdNpTjI3WHjWj7WKqgmV4ndotO/y7GwqvOX
|
||||
OwYJbwY9cIR/PPOGf0/UfUSfPTp6iWwfapN3B5YDoSrOk3ef8e0HXRcSMeIG9D0JWfKB
|
||||
YTFLsg6dqxdrPLsyDhFeJQQFK4+qb4gndM7SEw9UZtvvEbzGmGro9QFcO+uXsPZ6jQsb
|
||||
UNn7VJhOqi3sc+mNAmPSNN1KSjeZ5wQoJDKHAhc39P7HlCI6Upm3UgyejjToTNa5pFUH
|
||||
YfqgrPEU0NsJWZNUfnItYhChHXZyHE9iUcK8eDO7qRyvVAwkEdxmc34EC4hOJsHxdLli
|
||||
ik4A==
|
||||
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;
|
||||
h=to:from:subject:date:message-id:auto-submitted:sender:reply-to
|
||||
:mime-version:dkim-signature:dkim-signature:delivered-to;
|
||||
bh=DSYDWRwqF5i+Yosvco75LpPB3hH2JqH2JZElsHalDcM=;
|
||||
fh=opiyoKXgWpm8kcAa3Nw4m5S9DBRIdfMLcfsQwVK5zKs=;
|
||||
b=hyfgpNzlhW6aPYNzOd5CkaqQ2qYr/Sb25Qti1ez7y+n0SxJM/QbpyMCafAFv1s6vSR
|
||||
jdbmeaofRjmDkL0uDdoQb0E5TnycNKP3r4FWEKc2KZkfnKEtWWOivFDIvQDPF4NpYNn3
|
||||
9SFZkfmVa2TSfrnH4wRG37gCQgc6gzDpl6a2oZRmM4T44xbIXCIseFSalR+oUTFCJU3M
|
||||
XSBCNjV7w/V8S2hiH72Ace8enjUG+DRbeE8aYiNwu0XkECojPxGgBuM9OJPSmYzNt3LW
|
||||
7M+weqkx0Byoi6UDaI2NQqXH4wkSrjmIFcX+84jglfl2zOsPGwgehJYdo/QcPMXtQohY
|
||||
sMZA==;
|
||||
darn=xinu.tv
|
||||
ARC-Authentication-Results: i=2; mx.google.com;
|
||||
dkim=pass header.i=@google.com header.s=20230601 header.b=UV12BjMR;
|
||||
dkim=pass header.i=@gmail.com header.s=20230601 header.b=HTQ+XWtf;
|
||||
spf=pass (google.com: domain of tconvertino@gmail.com designates 209.85.220.73 as permitted sender) smtp.mailfrom=tconvertino@gmail.com;
|
||||
dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com;
|
||||
dara=pass header.i=@gmail.com
|
||||
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=1e100.net; s=20230601; t=1768662948; x=1769267748;
|
||||
h=to:from:subject:date:message-id:auto-submitted:sender:reply-to
|
||||
:mime-version:dkim-signature:dkim-signature:delivered-to
|
||||
:x-forwarded-for:x-forwarded-to:x-gm-message-state:from:to:cc
|
||||
:subject:date:message-id:reply-to;
|
||||
bh=DSYDWRwqF5i+Yosvco75LpPB3hH2JqH2JZElsHalDcM=;
|
||||
b=wCE8iOXwi+1PwnSvMIbzsg5Pdo1jXyrqQjqZN3UN9bXyLJmoKV+a5l4cE7La2TkWIe
|
||||
zdw/qcgetdMWPrJncmnLYptNMOMhHf8OmgDbtKbZLo1WVnY6OcnTTCWljhm9l3p1sNCJ
|
||||
NNvrE79CNsi4mB30/gh5GUSFldNs4CKXLoX5U1JyaR0URBNSdgTtWHQEk9Zip6lzSJ/W
|
||||
3myHdqXjlFIBn8JdN2F+Uvpe4SOcpUYivDzRzGgKBVBybgL+7/B2FVxu1DSqImvvdnew
|
||||
G45//ZKZLk1NZTwB9b3fVu1ZRrtVwXykyTsLWQs/L+h2RatzY5cbRknOUEg+Sh12glbJ
|
||||
Mvzg==
|
||||
X-Forwarded-Encrypted: i=2; AJvYcCWTlZh7K3d3elcvXPqK9OnJxLWgTqppYJqLWqVOMFJDYDcmSN8i4AmT2kLKruApNvLk5mchcQ==@xinu.tv
|
||||
X-Gm-Message-State: AOJu0YzRCKajwo80HG2ZJYkIh92JNKbnNkbFqaG5Dye25AAdsFY1p/Sa
|
||||
HUpoeDQQxTSXezOEygAE9wR8sFTjlB4uRgVqtHJ5s0ml5G9sQVG9Ir31aJU5vBs4OpeeAa01KHq
|
||||
OqoyqsCDybPJBW43d/qWOxpcpIORkUKMmPkNGNzU1+hFlox6fAt4TasNy8lbiLw==
|
||||
X-Received: by 2002:a05:6512:2507:b0:59b:b55a:a293 with SMTP id 2adb3069b0e04-59bb55aa3b5mr1328824e87.34.1768662947779;
|
||||
Sat, 17 Jan 2026 07:15:47 -0800 (PST)
|
||||
X-Forwarded-To: gmail@xinu.tv
|
||||
X-Forwarded-For: couchmoney@gmail.com gmail@xinu.tv
|
||||
Delivered-To: couchmoney@gmail.com
|
||||
Received: by 2002:a05:6504:2382:b0:2d3:710a:2457 with SMTP id h2csp2302771lty;
|
||||
Sat, 17 Jan 2026 07:15:46 -0800 (PST)
|
||||
X-Received: by 2002:a05:6808:221e:b0:45a:6ef9:79 with SMTP id 5614622812f47-45c9d86c3acmr2292013b6e.52.1768662946398;
|
||||
Sat, 17 Jan 2026 07:15:46 -0800 (PST)
|
||||
ARC-Seal: i=1; a=rsa-sha256; t=1768662946; cv=none;
|
||||
d=google.com; s=arc-20240605;
|
||||
b=KdiLKIN7OQmPF5O3bozzB9t0JL/To2npnCMuMVg4Iawwtni3NbkM+Y4nXB3Wtm5kAj
|
||||
Sa6HsrnbgNz3D8lp3nJB8bXexvVTc73ZQFDKtKnDRj7sv/8eK0qMpCkRb3Rhgu2cQEfa
|
||||
lYv7E0pEj0qcMxDM5osGhdhrwsV8BnEboHL38bCfhDxSmcmGsmPgiC5IWiyhcWq8G2W6
|
||||
XwwPDdcHXk4wLwy4AQ1/NR5q130ELNP1f2e1Xq+xxLhfuV7GzhgOCTxYBIzrzJdM0kC/
|
||||
Sxd1ejz+WLbowjVP2s4rStRtCvHU/g1LlPGmdnmyN9wQ+Tkya+Q7LjRWWB99e04qENOE
|
||||
3E9g==
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;
|
||||
h=to:from:subject:date:message-id:auto-submitted:sender:reply-to
|
||||
:mime-version:dkim-signature:dkim-signature;
|
||||
bh=DSYDWRwqF5i+Yosvco75LpPB3hH2JqH2JZElsHalDcM=;
|
||||
fh=mbzrMIWIgWMC0ni1xEx+ViW4J0RLAdLdPT2cX81nTlk=;
|
||||
b=R24D+rdvNBJO+lAlMBX/5KkpnryHlsj/t5x1rJvWsKG/yrKJe81Epa9aDOWh5pljV4
|
||||
Cg7IH6KrYLzYYMNQ83stCE7zIBs7sjtBl81bd/OpWCoXgJEAnE2bYs958fk3z8jINzBv
|
||||
huNTL3ijCNiZeI/y5Ye/S8avkRfWf1tNn7nNc7oVf6Xc+ujGIk28KL3EGerj29au519E
|
||||
MqL6BVYlSAx9VcBXY2vRZft2xDJo+JiKIw2n+XJT7+Ax0LubBX5BCfcRinBFT/XsVFTD
|
||||
zxNaxxq9DbbAtr78NgacXMOxmo8bJYi/MD0wo0BVZBxd3kXhKF367iEKBreXu7tYPp5i
|
||||
d7tg==;
|
||||
dara=google.com
|
||||
ARC-Authentication-Results: i=1; mx.google.com;
|
||||
dkim=pass header.i=@google.com header.s=20230601 header.b=UV12BjMR;
|
||||
dkim=pass header.i=@gmail.com header.s=20230601 header.b=HTQ+XWtf;
|
||||
spf=pass (google.com: domain of tconvertino@gmail.com designates 209.85.220.73 as permitted sender) smtp.mailfrom=tconvertino@gmail.com;
|
||||
dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com;
|
||||
dara=pass header.i=@gmail.com
|
||||
Received: from mail-sor-f73.google.com (mail-sor-f73.google.com. [209.85.220.73])
|
||||
by mx.google.com with SMTPS id 5614622812f47-45ca0e0d20dsor1067583b6e.18.2026.01.17.07.15.46
|
||||
for <couchmoney@gmail.com>
|
||||
(Google Transport Security);
|
||||
Sat, 17 Jan 2026 07:15:46 -0800 (PST)
|
||||
Received-SPF: pass (google.com: domain of tconvertino@gmail.com designates 209.85.220.73 as permitted sender) client-ip=209.85.220.73;
|
||||
Authentication-Results: mx.google.com;
|
||||
dkim=pass header.i=@google.com header.s=20230601 header.b=UV12BjMR;
|
||||
dkim=pass header.i=@gmail.com header.s=20230601 header.b=HTQ+XWtf;
|
||||
spf=pass (google.com: domain of tconvertino@gmail.com designates 209.85.220.73 as permitted sender) smtp.mailfrom=tconvertino@gmail.com;
|
||||
dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com;
|
||||
dara=pass header.i=@gmail.com
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=google.com; s=20230601; t=1768662946; x=1769267746; dara=google.com;
|
||||
h=to:from:subject:date:message-id:auto-submitted:sender:reply-to
|
||||
:mime-version:from:to:cc:subject:date:message-id:reply-to;
|
||||
bh=DSYDWRwqF5i+Yosvco75LpPB3hH2JqH2JZElsHalDcM=;
|
||||
b=UV12BjMRpTIHG34HTOnEB4ApBu4DnXlft6fU+aIV2TzL1HFmpDf9rz1riEoHyaWSGU
|
||||
P7ydXwhdNhl1b9SVRu+jhtsd0Wt7vLGTb/ru1OZEnxC8P2A9jCdqjT3J9GwtpZxcv4nh
|
||||
ipdJF6LYZ6yt1H2AftMJf59/9L1HbiwMs3MceHqj+R0AlU4KNtuevB/ImTump5XiSH/8
|
||||
iDgvVfqyvm2kYwp9yV4cMXWUIQG6bWHB/No01kLG2PtgOy45chmfp/P22/ZyY3wEFd/U
|
||||
044fReZdGmqwqGfhM81y2+WVwuzQltjv8dZ2yf1SeSVOLmrc8Uc5lYFvzQJK7NiaVsyv
|
||||
sYWQ==
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=gmail.com; s=20230601; t=1768662946; x=1769267746; dara=google.com;
|
||||
h=to:from:subject:date:message-id:auto-submitted:sender:reply-to
|
||||
:mime-version:from:to:cc:subject:date:message-id:reply-to;
|
||||
bh=DSYDWRwqF5i+Yosvco75LpPB3hH2JqH2JZElsHalDcM=;
|
||||
b=HTQ+XWtfciYuHpwOHCqsF6ctCQc5eRWblgRxVdEfjGFYy2TmgSb/jA5+HldQ7hxk5S
|
||||
mfppkAhF82R1zQM96e2QMnoamqslIpum/+pvdIfxbvXiAytCNOmQZoc1xhlTz5CCkpni
|
||||
g23H0O3kiXSdzhG4uLJgsGMaNR/rAkslbMW7ARNTluvuWM60d9At9ZCazZCVLq2C0nhS
|
||||
0HvaBa5uxi19A6l/55NmEbhPvAHXSw7V9SEUF8TTBuGLfZEkrjUF+RxfAgN/+NuZR5o7
|
||||
yOAlNI/iEi+F8T7Is+ZmjbHYysZu01/nzldZnZEQamYuUQBeKpbNHSEGbVrpD3+AuT6f
|
||||
/t8w==
|
||||
MIME-Version: 1.0
|
||||
X-Received: by 2002:a05:6820:1ca1:b0:65f:7009:d6e5 with SMTP id
|
||||
006d021491bc7-661188b9d4bmr1995718eaf.22.1768662945924; Sat, 17 Jan 2026
|
||||
07:15:45 -0800 (PST)
|
||||
Reply-To: tconvertino@gmail.com
|
||||
Sender: Google Calendar <calendar-notification@google.com>
|
||||
Auto-Submitted: auto-generated
|
||||
Message-ID: <calendar-3c0029f2-74ee-41a1-b1f0-0716665ce0d3@google.com>
|
||||
Date: Sat, 17 Jan 2026 15:15:45 +0000
|
||||
Subject: Updated invitation: painting class @ Thu Feb 12, 2026 7pm - 9pm (PST) (tconvertino@gmail.com)
|
||||
From: tconvertino@gmail.com
|
||||
To: couchmoney@gmail.com
|
||||
Content-Type: multipart/alternative; boundary="0000000000009e8d3e064896eeed"
|
||||
X-Rspamd-Queue-Id: 9ED9E80023
|
||||
X-Rspamd-Server: phx
|
||||
X-Spamd-Result: default: False [-0.70 / 15.00];
|
||||
URI_COUNT_ODD(1.00)[1];
|
||||
ARC_ALLOW(-1.00)[google.com:s=arc-20240605:i=2];
|
||||
DMARC_POLICY_ALLOW(-0.50)[gmail.com,none];
|
||||
MANY_INVISIBLE_PARTS(0.20)[3];
|
||||
R_DKIM_ALLOW(-0.20)[google.com:s=20230601,gmail.com:s=20230601];
|
||||
R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c];
|
||||
MIME_GOOD(-0.10)[multipart/alternative,text/plain];
|
||||
MIME_BASE64_TEXT(0.10)[];
|
||||
FREEMAIL_ENVFROM(0.00)[gmail.com];
|
||||
RCVD_TLS_LAST(0.00)[];
|
||||
RCVD_COUNT_THREE(0.00)[3];
|
||||
FREEMAIL_TO(0.00)[gmail.com];
|
||||
TAGGED_FROM(0.00)[caf_=gmail=xinutv];
|
||||
FREEMAIL_FROM(0.00)[gmail.com];
|
||||
FREEMAIL_REPLYTO(0.00)[gmail.com];
|
||||
MIME_TRACE(0.00)[0:+,1:+,2:~];
|
||||
RCPT_COUNT_ONE(0.00)[1];
|
||||
FORGED_SENDER(0.00)[tconvertino@gmail.com,couchmoney@gmail.com];
|
||||
RCVD_IN_DNSWL_NONE(0.00)[209.85.220.73:received];
|
||||
MISSING_XM_UA(0.00)[];
|
||||
HAS_REPLYTO(0.00)[tconvertino@gmail.com];
|
||||
TO_DN_NONE(0.00)[];
|
||||
DNSWL_BLOCKED(0.00)[209.85.167.47:from];
|
||||
FORGED_SENDER_FORWARDING(0.00)[];
|
||||
FROM_NEQ_ENVFROM(0.00)[tconvertino@gmail.com,couchmoney@gmail.com];
|
||||
DWL_DNSWL_NONE(0.00)[google.com:dkim];
|
||||
DKIM_TRACE(0.00)[google.com:+,gmail.com:+];
|
||||
DWL_DNSWL_BLOCKED(0.00)[gmail.com:dkim];
|
||||
TO_DOM_EQ_FROM_DOM(0.00)[];
|
||||
FROM_NO_DN(0.00)[];
|
||||
FWD_GOOGLE(0.00)[couchmoney@gmail.com];
|
||||
ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US];
|
||||
RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.47:from];
|
||||
REPLYTO_EQ_FROM(0.00)[]
|
||||
X-Rspamd-Action: no action
|
||||
X-TUID: SJoEMVYLjYPK
|
||||
|
||||
--0000000000009e8d3e064896eeed
|
||||
Content-Type: text/plain; charset="UTF-8"; format=flowed; delsp=yes
|
||||
Content-Transfer-Encoding: base64
|
||||
|
||||
VGhpcyBldmVudCBoYXMgYmVlbiB1cGRhdGVkDQpDaGFuZ2VkOiB0aW1lDQoNCg0KcGFpbnRpbmcg
|
||||
Y2xhc3MNClRodXJzZGF5IEZlYiAxMiwgMjAyNiDii4UgN3BtIOKAkyA5cG0NClBhY2lmaWMgVGlt
|
||||
ZSAtIExvcyBBbmdlbGVzDQoNCg0KDQpPcmdhbml6ZXINCnRjb252ZXJ0aW5vQGdtYWlsLmNvbQ0K
|
||||
dGNvbnZlcnRpbm9AZ21haWwuY29tDQoNCn5+Ly9+fg0KSW52aXRhdGlvbiBmcm9tIEdvb2dsZSBD
|
||||
YWxlbmRhcjogaHR0cHM6Ly9jYWxlbmRhci5nb29nbGUuY29tL2NhbGVuZGFyLw0KDQpZb3UgYXJl
|
||||
IHJlY2VpdmluZyB0aGlzIGVtYWlsIGJlY2F1c2UgeW91IGFyZSBzdWJzY3JpYmVkIHRvIGNhbGVu
|
||||
ZGFyICANCm5vdGlmaWNhdGlvbnMuIFRvIHN0b3AgcmVjZWl2aW5nIHRoZXNlIGVtYWlscywgZ28g
|
||||
dG8gIA0KaHR0cHM6Ly9jYWxlbmRhci5nb29nbGUuY29tL2NhbGVuZGFyL3Ivc2V0dGluZ3MsIHNl
|
||||
bGVjdCB0aGlzIGNhbGVuZGFyLCBhbmQgIA0KY2hhbmdlICJPdGhlciBub3RpZmljYXRpb25zIi4N
|
||||
Cg0KRm9yd2FyZGluZyB0aGlzIGludml0YXRpb24gY291bGQgYWxsb3cgYW55IHJlY2lwaWVudCB0
|
||||
byBzZW5kIGEgcmVzcG9uc2UgdG8gIA0KdGhlIG9yZ2FuaXplciwgYmUgYWRkZWQgdG8gdGhlIGd1
|
||||
ZXN0IGxpc3QsIGludml0ZSBvdGhlcnMgcmVnYXJkbGVzcyBvZiAgDQp0aGVpciBvd24gaW52aXRh
|
||||
dGlvbiBzdGF0dXMsIG9yIG1vZGlmeSB5b3VyIFJTVlAuDQoNCkxlYXJuIG1vcmUgaHR0cHM6Ly9z
|
||||
dXBwb3J0Lmdvb2dsZS5jb20vY2FsZW5kYXIvYW5zd2VyLzM3MTM1I2ZvcndhcmRpbmcNCg==
|
||||
--0000000000009e8d3e064896eeed
|
||||
Content-Type: text/html; charset="UTF-8"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
<!doctype html><html xmlns=3D"http://www.w3.org/1999/xhtml" xmlns:v=3D"urn:=
|
||||
schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-microsoft-com:office:offi=
|
||||
ce"><head><title></title><!--[if !mso]><meta http-equiv=3D"X-UA-Compatible"=
|
||||
content=3D"IE=3Dedge"><![endif]--><meta http-equiv=3D"Content-Type" conten=
|
||||
t=3D"text/html; charset=3DUTF-8"><meta name=3D"viewport" content=3D"width=
|
||||
=3Ddevice-width,initial-scale=3D1"><meta name=3D"color-scheme" content=3D"l=
|
||||
ight dark"><meta name=3D"supported-color-schemes" content=3D"light dark">
|
||||
<style>
|
||||
body, html {
|
||||
font-family: Roboto, Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-ms-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
#outlook a {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.ReadMsgBody {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.ExternalClass {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.ExternalClass * {
|
||||
line-height: 100%;
|
||||
}
|
||||
|
||||
table,
|
||||
td {
|
||||
mso-table-lspace: 0pt;
|
||||
mso-table-rspace: 0pt;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
height: auto;
|
||||
line-height: 100%;
|
||||
outline: none;
|
||||
text-decoration: none;
|
||||
-ms-interpolation-mode: bicubic;
|
||||
}
|
||||
|
||||
p {
|
||||
display: block;
|
||||
margin: 13px 0;
|
||||
}
|
||||
</style>
|
||||
<!--[if !mso]><!-->
|
||||
<style>
|
||||
@media only screen and (max-width:580px) {
|
||||
@-ms-viewport {
|
||||
width: 320px;
|
||||
}
|
||||
|
||||
@viewport {
|
||||
width: 320px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<!--<![endif]-->
|
||||
<!--[if mso]>
|
||||
<xml>
|
||||
<o:OfficeDocumentSettings>
|
||||
<o:AllowPNG/>
|
||||
<o:PixelsPerInch>96</o:PixelsPerInch>
|
||||
</o:OfficeDocumentSettings>
|
||||
</xml>
|
||||
<![endif]-->
|
||||
<!--[if lte mso 11]>
|
||||
<style>
|
||||
.outlook-group-fix { width:100% !important; }
|
||||
</style>
|
||||
<![endif]-->
|
||||
|
||||
<!--[if !mso]><!-- -->
|
||||
<style>body, html {font-family:Roboto,Helvetica,Arial,sans-serif;}@font-f=
|
||||
ace {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-stretch: normal;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v48/KFOMCnqEu92Fr1ME7kSn66aGLdTylUA=
|
||||
MQXC89YmC2DPNWubEbVmUiA8.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-stretch: normal;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v48/KFOMCnqEu92Fr1ME7kSn66aGLdTylUA=
|
||||
MQXC89YmC2DPNWub2bVmUiA8.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-stretch: normal;
|
||||
src: url(//fonts.gstatic.com/s/roboto/v48/KFOMCnqEu92Fr1ME7kSn66aGLdTylUA=
|
||||
MQXC89YmC2DPNWuYjalmUiA8.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Material Icons Extended';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(//fonts.gstatic.com/s/materialiconsextended/v154/kJEjBvgX7BgnkSr=
|
||||
UwT8UnLVc38YydejYY-oE_LvM.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Google Material Icons';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(//fonts.gstatic.com/s/googlematerialicons/v144/Gw6kwdfw6UnXLJCcm=
|
||||
afZyFRXb3BL9rvi0QZG3g.otf) format('opentype');
|
||||
}
|
||||
|
||||
.google-material-icons {
|
||||
font-family: 'Google Material Icons';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
letter-spacing: normal;
|
||||
text-transform: none;
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
word-wrap: normal;
|
||||
direction: ltr;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Google Material Icons Filled';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(//fonts.gstatic.com/s/googlematerialiconsfilled/v118/WWXFlimHYg6=
|
||||
HKI3TavMkbKdhBmDvgach8TVpeGsuueSZJH4.otf) format('opentype');
|
||||
}
|
||||
|
||||
.google-material-icons-filled {
|
||||
font-family: 'Google Material Icons Filled';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
letter-spacing: normal;
|
||||
text-transform: none;
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
word-wrap: normal;
|
||||
direction: ltr;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Google Sans';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(//fonts.gstatic.com/s/googlesans/v14/4UaGrENHsxJlGDuGo1OIlL3Owps=
|
||||
.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Google Sans';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
src: url(//fonts.gstatic.com/s/googlesans/v14/4UabrENHsxJlGDuGo1OIlLU94Yt=
|
||||
zCwM.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Google Sans';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: url(//fonts.gstatic.com/s/googlesans/v14/4UabrENHsxJlGDuGo1OIlLV154t=
|
||||
zCwM.ttf) format('truetype');
|
||||
}
|
||||
</style><!--<![endif]-->
|
||||
<style>
|
||||
.body-container {
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
}
|
||||
</style>
|
||||
=20
|
||||
<style>
|
||||
u+.body .body-container,
|
||||
body[data-outlook-cycle] .body-container,
|
||||
#MessageViewBody .body-container {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
</style>
|
||||
=20
|
||||
<style>
|
||||
@media only screen and (min-width:580px) {
|
||||
.column-per-37 {
|
||||
width: 37% !important;
|
||||
max-width: 37%;
|
||||
}
|
||||
|
||||
.column-per-63 {
|
||||
width: 63% !important;
|
||||
max-width: 63%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
=20
|
||||
<style>
|
||||
.appointment-buttons th {
|
||||
display: block;
|
||||
clear: both;
|
||||
float: left;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.appointment-buttons th a {
|
||||
float: left;
|
||||
}
|
||||
|
||||
#MessageViewBody .appointment-buttons th {
|
||||
margin-top: 24px;
|
||||
}
|
||||
</style>
|
||||
=20
|
||||
<style>
|
||||
@media only screen and (max-width:580px) {
|
||||
table.full-width-mobile {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
td.full-width-mobile {
|
||||
width: auto !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.main-container-inner,
|
||||
.info-bar-inner {
|
||||
padding: 12px 16px !important;
|
||||
}
|
||||
|
||||
.main-column-table-ltr {
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
|
||||
.main-column-table-rtl {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
@media only screen and (min-width:580px) {
|
||||
.main-container-inner {
|
||||
padding: 24px 32px !important;
|
||||
}
|
||||
|
||||
.info-bar-inner {
|
||||
padding: 12px 32px !important;
|
||||
}
|
||||
|
||||
.main-column-table-ltr {
|
||||
padding-right: 32px !important;
|
||||
}
|
||||
|
||||
.main-column-table-rtl {
|
||||
padding-left: 32px !important;
|
||||
}
|
||||
|
||||
.appointment-buttons th {
|
||||
display: table-cell;
|
||||
clear: none;
|
||||
}
|
||||
}
|
||||
|
||||
.primary-text {
|
||||
color: #3c4043 !important;
|
||||
}
|
||||
|
||||
.secondary-text,
|
||||
.phone-number a {
|
||||
color: #70757a !important;
|
||||
}
|
||||
|
||||
.accent-text {
|
||||
color: #1a73e8 !important;
|
||||
}
|
||||
|
||||
.accent-text-dark {
|
||||
color: #185abc !important;
|
||||
}
|
||||
|
||||
.grey-button-text,
|
||||
.attachment-chip a {
|
||||
color: #5f6368 !important;
|
||||
}
|
||||
|
||||
.primary-button {
|
||||
background-color: #1a73e8 !important;
|
||||
}
|
||||
|
||||
.primary-button-text {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.underline-on-hover:hover {
|
||||
text-decoration: underline !important;
|
||||
}
|
||||
|
||||
.grey-infobar-text {
|
||||
color: #202124 !important;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.primary-text:not([class^=3D"x_"]) {
|
||||
color: #e8eaed !important;
|
||||
}
|
||||
|
||||
.secondary-text:not([class^=3D"x_"]),
|
||||
.phone-number:not([class^=3D"x_"]) a {
|
||||
color: #9aa0a6 !important;
|
||||
}
|
||||
|
||||
.grey-button-text:not([class^=3D"x_"]),
|
||||
.attachment-chip:not([class^=3D"x_"]) a {
|
||||
color: #bdc1c6 !important;
|
||||
}
|
||||
|
||||
.accent-text:not([class^=3D"x_"]),
|
||||
.hairline-button-text:not([class^=3D"x_"]) {
|
||||
color: #8ab4f8 !important;
|
||||
}
|
||||
|
||||
.primary-button:not([class^=3D"x_"]) {
|
||||
background-color: #8ab4f8 !important;
|
||||
}
|
||||
|
||||
.primary-button-text:not([class^=3D"x_"]) {
|
||||
color: #202124 !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.cse-banner:not([class^=3D"x_"]) {
|
||||
background-color: #3c4043 !important; /* Google Grey 800 */
|
||||
}
|
||||
|
||||
.encryption-icon:not([class^=3D"x_"]) {
|
||||
/* WARNING: This causes the whole style tag to get stripped in Gm=
|
||||
ail. */
|
||||
background-image: url('https://fonts.gstatic.com/s/i/googlemateri=
|
||||
aliconsfilled/encrypted/v3/gm_grey200-24dp/2x/gm_filled_encrypted_gm_grey20=
|
||||
0_24dp.png') !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<!--[if !mso]><!-->
|
||||
<style>
|
||||
.prevent-link a {
|
||||
color: inherit !important;
|
||||
text-decoration: none !important;
|
||||
font-size: inherit !important;
|
||||
font-family: inherit !important;
|
||||
font-weight: inherit !important;
|
||||
line-height: inherit !important;
|
||||
}
|
||||
</style>
|
||||
<!--<![endif]-->
|
||||
|
||||
<!--[if mso | IE]>
|
||||
<style>
|
||||
.main-container-inner {
|
||||
padding: 24px 32px !important;
|
||||
}
|
||||
|
||||
.info-bar-inner {
|
||||
padding: 12px 32px !important;
|
||||
}
|
||||
|
||||
.cse-banner .encryption-icon {
|
||||
/* We use the IE workaround instead. */
|
||||
background-image: none !important;
|
||||
}
|
||||
|
||||
.cse-banner .encryption-icon .ms-fallback {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
/* NB: Some MS clients ignore dark-scheme styling and apply their o=
|
||||
wn, so there's nothing we can do to help there. */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.cse-banner:not([class^=3D"x_"]) .encryption-icon .ms-fallback {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.cse-banner:not([class^=3D"x_"]) .encryption-icon .ms-fallback-da=
|
||||
rk {
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<![endif]-->
|
||||
</head><body class=3D"body"><span itemscope itemtype=3D"http://schema.org=
|
||||
/InformAction"><span itemprop=3D"object" itemscope itemtype=3D"http://schem=
|
||||
a.org/Event"><meta itemprop=3D"eventStatus" content=3D"http://schema.org/Ev=
|
||||
entRescheduled"/><span itemprop=3D"publisher" itemscope itemtype=3D"http://=
|
||||
schema.org/Organization"><meta itemprop=3D"name" content=3D"Google Calendar=
|
||||
"/></span><meta itemprop=3D"eventId/googleCalendar" content=3D"4octcgvhijqj=
|
||||
m45h8d9dr4iq1m"/><span style=3D"display: none; font-size: 1px; color: #fff;=
|
||||
line-height: 1px; height: 0; max-height: 0; width: 0; max-width: 0; opacit=
|
||||
y: 0; overflow: hidden;" itemprop=3D"name">painting class</span><meta itemp=
|
||||
rop=3D"url" content=3D"https://calendar.google.com/calendar/r?eid=3DNG9jdGN=
|
||||
ndmhpanFqbTQ1aDhkOWRyNGlxMW0gdGNvbnZlcnRpbm9AbQ&es=3D1"/><span aria-hid=
|
||||
den=3D"true"><time itemprop=3D"startDate" datetime=3D"20260213T030000Z"></t=
|
||||
ime><time itemprop=3D"endDate" datetime=3D"20260213T050000Z"></time></span>=
|
||||
<div style=3D"display: none; font-size: 1px; color: #fff; line-height: 1px;=
|
||||
height: 0; max-height: 0; width: 0; max-width: 0; opacity: 0; overflow: hi=
|
||||
dden;">You have been invited by tconvertino@gmail.com to attend an event na=
|
||||
med painting class on Thursday Feb 12, 2026 =E2=8B=85 7pm =E2=80=93 9pm (Pa=
|
||||
cific Time - Los Angeles).</div><table border=3D"0" cellpadding=3D"0" cells=
|
||||
pacing=3D"0" role=3D"presentation" align=3D"center" style=3D"width:100%;" c=
|
||||
lass=3D"body-container"><tbody><tr><td style=3D"" class=3D"" align=3D"left"=
|
||||
><!--[if mso | IE]><table border=3D"0" cellpadding=3D"0" cellspacing=3D"0" =
|
||||
role=3D"presentation"><tr><td height=3D"16" style=3D"height:16px;"><![endif=
|
||||
]--><div style=3D"height:16px;" aria-hidden=3D"true"> </div><!--[if =
|
||||
mso | IE]></td></tr></table><![endif]--><table border=3D"0" cellpadding=3D"=
|
||||
0" cellspacing=3D"0" role=3D"presentation" align=3D"center" style=3D"width:=
|
||||
100%;" class=3D""><tbody><tr><td style=3D"background-color: #e6f4ea;color: =
|
||||
#0d5327;padding: 12px 32px; border-radius: 8px;font-family: Roboto, sans-se=
|
||||
rif;font-size: 14px; line-height: 20px;text-align: left;" class=3D"info-bar=
|
||||
-inner"><span style=3D"font-weight: 700;">This event has been updated</span=
|
||||
><br/><span style=3D"display:none" itemprop=3D"about" itemscope itemtype=3D=
|
||||
"http://schema.org/Thing/Clock"><meta itemprop=3D"description" content=3D"T=
|
||||
ime updated"/></span><div style=3D""><span style=3D"font-weight: 700;">Chan=
|
||||
ged:</span> time</div></td></tr></tbody></table><!--[if mso | IE]><table bo=
|
||||
rder=3D"0" cellpadding=3D"0" cellspacing=3D"0" role=3D"presentation"><tr><t=
|
||||
d height=3D"12" style=3D"height:12px;"><![endif]--><div style=3D"height:12p=
|
||||
x;" aria-hidden=3D"true"> </div><!--[if mso | IE]></td></tr></table>=
|
||||
<![endif]--><table border=3D"0" cellpadding=3D"0" cellspacing=3D"0" role=3D=
|
||||
"presentation" align=3D"center" style=3D"width:100%;" class=3D""><tbody><tr=
|
||||
><td style=3D"border: solid 1px #dadce0; border-radius: 8px; direction: rtl=
|
||||
; font-size: 0; padding: 24px 32px; text-align: left; vertical-align: top;"=
|
||||
class=3D"main-container-inner"><!--[if mso | IE]><table border=3D"0" cellp=
|
||||
adding=3D"0" cellspacing=3D"0" role=3D"presentation"><tr><![endif]--><div c=
|
||||
lass=3D"" style=3D"font-size: 13px; text-align: left; direction: ltr; displ=
|
||||
ay: inline-block; vertical-align: top; width: 100%;overflow: hidden; word-w=
|
||||
rap: break-word;"><table border=3D"0" cellpadding=3D"0" cellspacing=3D"0" r=
|
||||
ole=3D"presentation" width=3D"100%" class=3D"main-column-table-ltr" style=
|
||||
=3D"padding-right: 32px; padding-left: 0;;table-layout: fixed;"><tbody><tr>=
|
||||
<td class=3D"main-column-td" style=3D"padding:0; vertical-align:top;"><tabl=
|
||||
e border=3D"0" cellpadding=3D"0" cellspacing=3D"0" role=3D"presentation" wi=
|
||||
dth=3D"100%" style=3D"table-layout: fixed;"><tr><td style=3D"font-size: 0; =
|
||||
padding: 0; text-align: left; word-break: break-word;;padding-bottom:24px;"=
|
||||
><div style=3D"font-family: Roboto, sans-serif;font-style: normal; font-wei=
|
||||
ght: 400; font-size: 14px; line-height: 20px; letter-spacing: 0.2px;color: =
|
||||
#3c4043; text-decoration: none;" class=3D"primary-text" role=3D"presentatio=
|
||||
n"><span aria-hidden=3D"true"><time itemprop=3D"startDate" datetime=3D"2026=
|
||||
0213T030000Z"></time><time itemprop=3D"endDate" datetime=3D"20260213T050000=
|
||||
Z"></time></span><table border=3D"0" cellpadding=3D"0" cellspacing=3D"0" ro=
|
||||
le=3D"presentation" style=3D"padding-bottom: 4px;"><tr><td><h2 class=3D"pri=
|
||||
mary-text" style=3D"font-size: 14px;color: #3c4043; text-decoration: none;f=
|
||||
ont-weight: 700;-webkit-font-smoothing: antialiased;margin: 0; padding: 0;"=
|
||||
>When</h2></td><td style=3D"width: 8px;"></td><td style=3D"padding-top: 2px=
|
||||
; padding-bottom: 3px;"><div style=3D"background-color: #1e8e3e; border-rad=
|
||||
ius: 10px; padding: 1px 5px; line-height: 13px;"><span style=3D"color: whit=
|
||||
e; font-size: 11px; font-weight: 700; letter-spacing: 0.8px; text-transform=
|
||||
: uppercase; vertical-align: top;">CHANGED</span></div></td></tr></table><s=
|
||||
pan>Thursday Feb 12, 2026 =E2=8B=85 7pm =E2=80=93 9pm (Pacific Time - Los A=
|
||||
ngeles)<br/><span style=3D"text-decoration: line-through;"><del><span style=
|
||||
=3D"display: none; font-size: 1px; color: #fff; line-height: 1px; height: 0=
|
||||
; max-height: 0; width: 0; max-width: 0; opacity: 0; overflow: hidden;font-=
|
||||
size: 0; display: block;">Old: </span>Thursday Jan 22, 2026 =E2=8B=85 7pm =
|
||||
=E2=80=93 9pm (Pacific Time - Los Angeles)</del></span></span></div></td></=
|
||||
tr><tr><td style=3D"font-size: 0; padding: 0; text-align: left; word-break:=
|
||||
break-word;;padding-bottom:24px;"><div style=3D"font-family: Roboto, sans-=
|
||||
serif;font-style: normal; font-weight: 400; font-size: 14px; line-height: 2=
|
||||
0px; letter-spacing: 0.2px;color: #3c4043; text-decoration: none;" class=3D=
|
||||
"primary-text" role=3D"presentation"><table border=3D"0" cellpadding=3D"0" =
|
||||
cellspacing=3D"0" role=3D"presentation" style=3D"padding-bottom: 4px;"><tr>=
|
||||
<td><h2 class=3D"primary-text" style=3D"font-size: 14px;color: #3c4043; tex=
|
||||
t-decoration: none;font-weight: 700;-webkit-font-smoothing: antialiased;mar=
|
||||
gin: 0; padding: 0;">Organizer</h2></td></tr></table><div style=3D"color: #=
|
||||
3c4042;"><span class=3D"notranslate"><a class=3D"primary-text underline-on-=
|
||||
hover" style=3D"display: inline-block;;color: #3c4043; text-decoration: non=
|
||||
e;" href=3D"mailto:tconvertino@gmail.com">tconvertino@gmail.com</a></span><=
|
||||
span itemprop=3D"organizer" itemscope itemtype=3D"http://schema.org/Person"=
|
||||
><meta itemprop=3D"name" content=3D"tconvertino@gmail.com"/><meta itemprop=
|
||||
=3D"email" content=3D"tconvertino@gmail.com"/></span></div></div></td></tr>=
|
||||
<tr><td style=3D"font-size: 0; padding: 0; text-align: left; word-break: br=
|
||||
eak-word;;padding-bottom:24px;"><div style=3D"font-family: Roboto, sans-ser=
|
||||
if;font-style: normal; font-weight: 400; font-size: 14px; line-height: 20px=
|
||||
; letter-spacing: 0.2px;color: #3c4043; text-decoration: none;" class=3D"pr=
|
||||
imary-text" role=3D"presentation"><table border=3D"0" cellpadding=3D"0" cel=
|
||||
lspacing=3D"0" role=3D"presentation" style=3D"padding-bottom: 4px;"><tr><td=
|
||||
><h2 class=3D"primary-text" style=3D"font-size: 14px;color: #3c4043; text-d=
|
||||
ecoration: none;font-weight: 700;-webkit-font-smoothing: antialiased;margin=
|
||||
: 0; padding: 0;">Guests</h2></td></tr></table><div style=3D"padding-bottom=
|
||||
: 4px; text-align: left;;color: #3c4042;"></div><a href=3D"https://calendar=
|
||||
.google.com/calendar/r?eid=3DNG9jdGNndmhpanFqbTQ1aDhkOWRyNGlxMW0gdGNvbnZlcn=
|
||||
Rpbm9AbQ&es=3D1" style=3D"display: inline-block;;color: #1a73e8; text-d=
|
||||
ecoration: none;font-weight: 700;" target=3D"_blank" class=3D"accent-text u=
|
||||
nderline-on-hover">View all guest info</a></div></td></tr></table></td></tr=
|
||||
></tbody></table></div><!--[if mso | IE]></tr></table><![endif]--></td></tr=
|
||||
></tbody></table><table border=3D"0" cellpadding=3D"0" cellspacing=3D"0" ro=
|
||||
le=3D"presentation" align=3D"center" style=3D"width:100%;" class=3D""><tbod=
|
||||
y><tr><td style=3D"font-size: 0; padding: 0; text-align: left; word-break: =
|
||||
break-word;;padding:4px 12px;" class=3D"" align=3D"left"><div class=3D"seco=
|
||||
ndary-text" style=3D"color: #70757a; text-decoration: none;font-family: Rob=
|
||||
oto, sans-serif;font-size: 12px; line-height: 16px; mso-line-height-rule: e=
|
||||
xactly; text-align: left;"><p>Invitation from <a href=3D"https://calendar.g=
|
||||
oogle.com/calendar/" class=3D"accent-text underline-on-hover" style=3D"font=
|
||||
-family: Roboto, sans-serif;font-size: 12px; line-height: 16px; mso-line-he=
|
||||
ight-rule: exactly;;color: #1a73e8; text-decoration: none;" target=3D"_blan=
|
||||
k">Google Calendar</a></p><p>You are receiving this email because you are s=
|
||||
ubscribed to calendar notifications. To stop receiving these emails, go to =
|
||||
<a href=3D"https://calendar.google.com/calendar/r/settings" class=3D"accent=
|
||||
-text underline-on-hover" style=3D"font-family: Roboto, sans-serif;font-siz=
|
||||
e: 12px; line-height: 16px; mso-line-height-rule: exactly;;color: #1a73e8; =
|
||||
text-decoration: none;" target=3D"_blank">Calendar settings</a>, select thi=
|
||||
s calendar, and change "Other notifications".</p><p>Forwarding this invitat=
|
||||
ion could allow any recipient to send a response to the organizer, be added=
|
||||
to the guest list, invite others regardless of their own invitation status=
|
||||
, or modify your RSVP. <a class=3D"accent-text underline-on-hover" style=3D=
|
||||
"font-family: Roboto, sans-serif;font-size: 12px; line-height: 16px; mso-li=
|
||||
ne-height-rule: exactly;;color: #1a73e8; text-decoration: none;" href=3D"ht=
|
||||
tps://support.google.com/calendar/answer/37135#forwarding">Learn more</a></=
|
||||
p></div></td></tr></tbody></table></td></tr></tbody></table></span></span><=
|
||||
/body></html>
|
||||
--0000000000009e8d3e064896eeed--
|
||||
175
server/testdata/google-calendar-example-thursday.eml
vendored
Normal file
175
server/testdata/google-calendar-example-thursday.eml
vendored
Normal file
@@ -0,0 +1,175 @@
|
||||
Return-Path: <couchmoney+caf_=gmail=xinu.tv@gmail.com>
|
||||
Delivered-To: bill@xinu.tv
|
||||
Received: from phx.xinu.tv [74.207.253.222]
|
||||
by nixos-01.h.xinu.tv with IMAP (fetchmail-6.5.1)
|
||||
for <wathiede@localhost> (single-drop); Thu, 11 Sep 2025 12:27:35 -0700 (PDT)
|
||||
Received: from phx.xinu.tv
|
||||
by phx.xinu.tv with LMTP
|
||||
id CqRrBqciw2hiKicAJR8clQ
|
||||
(envelope-from <couchmoney+caf_=gmail=xinu.tv@gmail.com>)
|
||||
for <bill@xinu.tv>; Thu, 11 Sep 2025 12:27:35 -0700
|
||||
X-Original-To: gmail@xinu.tv
|
||||
Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::130; helo=mail-lf1-x130.google.com; envelope-from=couchmoney+caf_=gmail=xinu.tv@gmail.com; receiver=xinu.tv
|
||||
Authentication-Results: phx.xinu.tv;
|
||||
dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20230601 header.b=dc+iKaXd;
|
||||
dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=kf8o8wAd
|
||||
Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130])
|
||||
by phx.xinu.tv (Postfix) with ESMTPS id D7E2D80037
|
||||
for <gmail@xinu.tv>; Thu, 11 Sep 2025 12:27:33 -0700 (PDT)
|
||||
Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-55f716e25d9so1141446e87.1
|
||||
for <gmail@xinu.tv>; Thu, 11 Sep 2025 12:27:33 -0700 (PDT)
|
||||
ARC-Seal: i=2; a=rsa-sha256; t=1757618852; cv=pass;
|
||||
d=google.com; s=arc-20240605;
|
||||
b=MZ+1JfQuPR9luCCxiZNUeqSEpjt1vLuM3bTRCaal/W0NBxkCH0y5v9WfPR0KJ2BPb1
|
||||
Rtnt/5ayDtmsLf8l6yTTVsBlFYW70ehqXWMD10MMcDEMvnib4KKDAacGaSmijAK4cYGq
|
||||
FOU9CGNY986OMXMk54TD9NF3fkKDIKcAoh81D6at5/DE3Puuxofq0vZmtmVqQBNKG169
|
||||
REkhcDpkXTMs/4rJpmZwXp2HbjD84avusBwSlYIQUWsBgO4g7THHjoR4Uk56cek9aEds
|
||||
ip8IkTO6KRFe6u8FebQsZ/Q9sSAK3pheMExWFVMha9Y0XhACVOZiV600zRCPS9MNHhYw
|
||||
XEaA==
|
||||
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;
|
||||
h=to:from:subject:date:message-id:auto-submitted:sender:reply-to
|
||||
:mime-version:dkim-signature:dkim-signature:delivered-to;
|
||||
bh=mVNsDGUAhSGrAIoTy8PIfvCBxBB4yaBy/VZH8i3gPl4=;
|
||||
fh=WnbwIlqFRbBot/H7TyqablNBDgXRuegsgjC3piothTI=;
|
||||
b=aYMo5f7VI2b4CiAvLELRJ9zM3dF7ZH8FEqmoAtCcfPHrT9kLLCnriuyXG1R6sC3eoR
|
||||
++boT29xoScVroIlfcI77Ty7N5X1fawOABkVDWWt7z5w4WhiesT0klxw5nINj9hnLBiK
|
||||
22nrMevpRpFtmuDO7cle78lSAFZoZuyv+aXCK9RnLKvIm2JuXRrvU8LivxbbpNB4gNl0
|
||||
hE1jsGuZm1SOJ54SRLwwa4HpSiOJV2x2txTtPCzmvE/LZvNESPjfi3Y2u7gaR87OzkNs
|
||||
gNi5Xoc+D908zBsmcYKpUYiQcPL79s3DfNwYFIs/rR8Z2xgaHbFD/YmqRUmCEeNLv7o2
|
||||
RR8g==;
|
||||
darn=xinu.tv
|
||||
ARC-Authentication-Results: i=2; mx.google.com;
|
||||
dkim=pass header.i=@google.com header.s=20230601 header.b=dc+iKaXd;
|
||||
dkim=pass header.i=@gmail.com header.s=20230601 header.b=kf8o8wAd;
|
||||
spf=pass (google.com: domain of tconvertino@gmail.com designates 209.85.220.73 as permitted sender) smtp.mailfrom=tconvertino@gmail.com;
|
||||
dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com;
|
||||
dara=pass header.i=@gmail.com
|
||||
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=1e100.net; s=20230601; t=1757618852; x=1758223652;
|
||||
h=to:from:subject:date:message-id:auto-submitted:sender:reply-to
|
||||
:mime-version:dkim-signature:dkim-signature:delivered-to
|
||||
:x-forwarded-for:x-forwarded-to:x-gm-message-state:from:to:cc
|
||||
:subject:date:message-id:reply-to;
|
||||
bh=mVNsDGUAhSGrAIoTy8PIfvCBxBB4yaBy/VZH8i3gPl4=;
|
||||
b=GKJkb+LmE79XIMEhHRvoCodKS+GBTOCShzMe06Q+zKxUZFHi6XMg8GqteuXQO9LVbw
|
||||
nPUVN4QO2Hvqch0xzjbc0ryyMOD0u7HqpDUAEZCzamFXIfsX6hZXKLhFqy4YomtsG3os
|
||||
TCOWBGLqwu7KalfOVg2p+csOR68i0mGyBII1sKcL9vUv9kIQJZxQKHGkuIc48cf6tbUB
|
||||
L+mkVbMwXLSbpuTJszPmIVZV5o0K52KN+2QoLcmXGfw0mUOnjNI0oSovdbPg4SSDZ3cw
|
||||
iIsC9vjvtCSFS3pf+Fp807s+Zjh5P6xeSxGU57qhC+HT9kTzIioh5EqKnGqcskDTqrI1
|
||||
uCiQ==
|
||||
X-Forwarded-Encrypted: i=2; AJvYcCUfSSA2sT31daRt2+W7dAD9YPx1gqa4JFpVuqCtxVtjqbKfKhOX/EcDQiECQ4BEWjmAP+IqTQ==@xinu.tv
|
||||
X-Gm-Message-State: AOJu0Ywn7D0BjTaGiM/UFG0WhGuyYGfpLijg+ouhrOaGZzSREyTcRa37
|
||||
XA3bzQ/LKTpzWhhh01GMwnigmELbWdIVr/BeRLVCuJdh+m+JBMgnAjBTIDs9RF3/xfR7rpG7VOB
|
||||
6k+ugF+8QRKB4BcL2t8MvfJD03CkrzuhhvUtFTRHopcSZrkqzh8GOJayq42VveQ==
|
||||
X-Received: by 2002:a05:6512:3b24:b0:55f:6580:818c with SMTP id 2adb3069b0e04-57050fe2fa3mr165340e87.46.1757618851553;
|
||||
Thu, 11 Sep 2025 12:27:31 -0700 (PDT)
|
||||
X-Forwarded-To: gmail@xinu.tv
|
||||
X-Forwarded-For: couchmoney@gmail.com gmail@xinu.tv
|
||||
Delivered-To: couchmoney@gmail.com
|
||||
Received: by 2002:a05:6504:d09:b0:2c3:f6c4:ad72 with SMTP id c9csp3388833lty;
|
||||
Thu, 11 Sep 2025 12:27:29 -0700 (PDT)
|
||||
X-Received: by 2002:a05:6602:36ce:b0:889:b536:779b with SMTP id ca18e2360f4ac-8903378d714mr78653239f.7.1757618849269;
|
||||
Thu, 11 Sep 2025 12:27:29 -0700 (PDT)
|
||||
ARC-Seal: i=1; a=rsa-sha256; t=1757618849; cv=none;
|
||||
d=google.com; s=arc-20240605;
|
||||
b=Ln2bufZfSNhR/NmMPrG2QFdtvupjJtLDQnFvsL8HTPn+Dlrt5ff+6k6Wpupab/5mS7
|
||||
hXjtVD0jnryGUiM5h+SNjxwzNPM3PBoueTpAzzBkjHQqMxJVpspgsGJUVOWAVRBWtWo
|
||||
39qFyoP0vhzGRWDAuAFV+4VDhsvH7GL8lTrZCSMzrngTadmEdJ5haUIQOa50KFUn5HrK
|
||||
1r12gayb+TaGaWfQfDo0Me689T8MQnS0ITUuzgvFxfgHZBz3h+IPnC0hrlhdziGovETo
|
||||
GvHzgCCtiVzu6rop6VMLjLuAYmmT9+jZ3GjSRb+078C9cJR17YpguOC14Cyv4od1Tf7y
|
||||
RFiQ==;
|
||||
dara=google.com
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;
|
||||
h=to:from:subject:date:message-id:auto-submitted:sender:reply-to
|
||||
:mime-version:dkim-signature:dkim-signature;
|
||||
bh=mVNsDGUAhSGrAIoTy8PIfvCBxBB4yaBy/VZH8i3gPl4=;
|
||||
fh=mbzrMIWIgWMC0ni1xEx+ViW4J0RLAdLdPT2cX81nTlk=;
|
||||
b=JRkHr3CKSkCrafdLzBRtaBOGNl3/0ZSTtgubaNXtvhAiIqRqiQYocfLnVM6N/9sH7O
|
||||
byTXYaRoaRLw/35WM+QTFGP3zUGRkM3eO4UVS/utVIss1IVLDjfmZHalqLYl8RokW5br
|
||||
89Z/xYIyjTE7WUdy6uMSrExCNm5VWjO/qcMKsE5s5oDbXdSLaUYxLTurICM3LQksGkCY
|
||||
wiAWaDDqK14+uhEhW5AyEnebDSYhL9U8UadIv+eK6Ng9q1kwOUzxICRQXEyUtnKhaDKJ
|
||||
eZ1Qe1mp1CjCulr+I15fz3VwUJ6W1cv6cytcxPbu4p5GPn2gb2hS1eR81HVTL6V1Sp5G
|
||||
NdDQ==;
|
||||
dara=google.com
|
||||
ARC-Authentication-Results: i=1; mx.google.com;
|
||||
dkim=pass header.i=@google.com header.s=20230601 header.b=dc+iKaXd;
|
||||
dkim=pass header.i=@gmail.com header.s=20230601 header.b=kf8o8wAd;
|
||||
spf=pass (google.com: domain of tconvertino@gmail.com designates 209.85.220.73 as permitted sender) smtp.mailfrom=tconvertino@gmail.com;
|
||||
dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com;
|
||||
dara=pass header.i=@gmail.com
|
||||
Received: from mail-sor-f73.google.com (mail-sor-f73.google.com. [209.85.220.73])
|
||||
by mx.google.com with SMTPS id ca18e2360f4ac-88f2ea1122asor117632339f.3.2025.09.11.12.27.29
|
||||
for <couchmoney@gmail.com>
|
||||
(Google Transport Security);
|
||||
Thu, 11 Sep 2025 12:27:29 -0700 (PDT)
|
||||
Received-SPF: pass (google.com: domain of tconvertino@gmail.com designates 209.85.220.73 as permitted sender) client-ip=209.85.220.73;
|
||||
Authentication-Results: mx.google.com;
|
||||
dkim=pass header.i=@google.com header.s=20230601 header.b=dc+iKaXd;
|
||||
dkim=pass header.i=@gmail.com header.s=20230601 header.b=kf8o8wAd;
|
||||
spf=pass (google.com: domain of tconvertino@gmail.com designates 209.85.220.73 as permitted sender) smtp.mailfrom=tconvertino@gmail.com;
|
||||
dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com;
|
||||
dara=pass header.i=@gmail.com
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=google.com; s=20230601; t=1757618849; x=1758223649; dara=google.com;
|
||||
h=to:from:subject:date:message-id:auto-submitted:sender:reply-to
|
||||
:mime-version:from:to:cc:subject:date:message-id:reply-to;
|
||||
bh=mVNsDGUAhSGrAIoTy8PIfvCBxBB4yaBy/VZH8i3gPl4=;
|
||||
b=dc+iKaXdFyqu6K0MIgk848QuwpQXvwzwlEVkxmjuCWvn9DzanMbYn5QJRyRTKilRna
|
||||
BZ7gJSPriHUHcJd4fVKgGuCaQg0TxenCwm+0R64oB1xcDLfonayo/nCrFqEcCLHNmi7x
|
||||
lTyWGJ0rLw6nKazxtcCdIbDhVgiE7/fXNI89w6XFp6pcKLl48yFIoCG1f6uY4iQ7QqNU
|
||||
hLHzjmlzjTi58xFLao7SizZ0lr7E5cHXKHp1Ls/hkDzzcY0Y+O5+3r+NQw4MtpHTcY6/
|
||||
kQlg6OhyMx8PTu4cuepQKXLHV4aFaNJbDQTp8wew4xPIgi7pm2p6hb6C3GgwY6ptOvLd
|
||||
wuag==
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=gmail.com; s=20230601; t=1757618849; x=1758223649; dara=google.com;
|
||||
h=to:from:subject:date:message-id:auto-submitted:sender:reply-to
|
||||
:mime-version:from:to:cc:subject:date:message-id:reply-to;
|
||||
bh=mVNsDGUAhSGrAIoTy8PIfvCBxBB4yaBy/VZH8i3gPl4=;
|
||||
b=kf8o8wAd5DSU/NC7SDiuIoohCu+/7wTjWyQqDYbBjUFGaBaYdj6aD5JWNQ1KEA2W8o
|
||||
E+Qy2ymyrzodKa1eOsQX2UDAYKOKpdxMWvx1u19+SC3Dp8DP4puRMrL2ObiSEMLCuOvz
|
||||
Mxmkd+ZUP72EhVuQwK1iSm04/cjQaMsSiPhvSBaxXMaaarwlKeOoCoIo+qC/Z9emiBBv
|
||||
Gk0sQcLA+CByvsxuvD9GInSA0rdoZ0ijhSb0Y475Hieam1QQqy/fhe8lgujzhXNFoIbR
|
||||
5EA9GE0VV9PDoNanaT+u954YeOFBL2YZ5gm2gHltw8tBI98LKnC42Pa3qyMznBa2dI2Q
|
||||
A0RQ==
|
||||
X-Google-Smtp-Source: AGHT+IGmC5/03nTVMeYJBoq1R/BiA19iH0DFaZyyImB3W8mtgjdn+XqIFK1fC8aTwWRXQmsr71Xo0cmkgx6hjPvicQ/d
|
||||
MIME-Version: 1.0
|
||||
X-Received: by 2002:a05:6602:380d:b0:887:4c93:f12c with SMTP id
|
||||
ca18e2360f4ac-8903596aca3mr58994639f.17.1757618848817; Thu, 11 Sep 2025
|
||||
12:27:28 -0700 (PDT)
|
||||
Reply-To: tconvertino@gmail.com
|
||||
Sender: Google Calendar <calendar-notification@google.com>
|
||||
Auto-Submitted: auto-generated
|
||||
Message-ID: <calendar-01d5e8a0-fad7-450b-9758-a16472bf2aa8@google.com>
|
||||
Date: Thu, 11 Sep 2025 19:27:28 +0000
|
||||
Subject: Canceled event: Scout Babysits @ Thu Sep 11, 2025 6pm - 9pm (PDT) (Family)
|
||||
From: tconvertino@gmail.com
|
||||
To: couchmoney@gmail.com
|
||||
Content-Type: multipart/mixed; boundary="000000000000226b77063e8b878d"
|
||||
|
||||
--000000000000226b77063e8b878d
|
||||
Content-Type: text/calendar; charset="UTF-8"; method=CANCEL
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
BEGIN:VCALENDAR
|
||||
PRODID:-//Google Inc//Google Calendar 70.9054//EN
|
||||
VERSION:2.0
|
||||
CALSCALE:GREGORIAN
|
||||
METHOD:CANCEL
|
||||
X-GOOGLE-CALID:g66m0feuqsao8l1c767pvvcg4k@group.calendar.google.com
|
||||
BEGIN:VEVENT
|
||||
DTSTART:20250912T010000Z
|
||||
DTEND:20250912T040000Z
|
||||
DTSTAMP:20250911T192728Z
|
||||
UID:4ang6172d1t7782sn2hmi30fgi@google.com
|
||||
CREATED:20250901T224707Z
|
||||
DESCRIPTION:
|
||||
LAST-MODIFIED:20250911T192728Z
|
||||
LOCATION:
|
||||
SEQUENCE:1
|
||||
STATUS:CANCELLED
|
||||
SUMMARY:Scout Babysits
|
||||
TRANSP:OPAQUE
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
|
||||
--000000000000226b77063e8b878d--
|
||||
169
server/testdata/google-calendar-example.eml
vendored
Normal file
169
server/testdata/google-calendar-example.eml
vendored
Normal file
@@ -0,0 +1,169 @@
|
||||
Return-Path: <couchmoney+caf_=gmail=xinu.tv@gmail.com>
|
||||
Delivered-To: bill@xinu.tv
|
||||
Received: from phx.xinu.tv [74.207.253.222]
|
||||
by nixos-01.h.xinu.tv with IMAP (fetchmail-6.4.39)
|
||||
for <wathiede@localhost> (single-drop); Mon, 02 Jun 2025 07:06:34 -0700 (PDT)
|
||||
Received: from phx.xinu.tv
|
||||
by phx.xinu.tv with LMTP
|
||||
id qDo+FuqvPWh51xIAJR8clQ
|
||||
(envelope-from <couchmoney+caf_=gmail=xinu.tv@gmail.com>)
|
||||
for <bill@xinu.tv>; Mon, 02 Jun 2025 07:06:34 -0700
|
||||
X-Original-To: gmail@xinu.tv
|
||||
Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::130; helo=mail-lf1-x130.google.com; envelope-from=couchmoney+caf_=gmail=xinu.tv@gmail.com; receiver=xinu.tv
|
||||
Authentication-Results: phx.xinu.tv;
|
||||
dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20230601 header.b=zT2yUtVH;
|
||||
dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=nmJW8N67
|
||||
Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130])
|
||||
by phx.xinu.tv (Postfix) with ESMTPS id 912AC80034
|
||||
for <gmail@xinu.tv>; Mon, 02 Jun 2025 07:06:32 -0700 (PDT)
|
||||
Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-54e7967cf67so5267078e87.0
|
||||
for <gmail@xinu.tv>; Mon, 02 Jun 2025 07:06:32 -0700 (PDT)
|
||||
ARC-Seal: i=2; a=rsa-sha256; t=1748873190; cv=pass;
|
||||
d=google.com; s=arc-20240605;
|
||||
b=W3s0wT+CV1W21AldY9lfxPlKRbc7XMoorEnilNq5iGjlw18vDM6eFPb+btqaGAPOPe
|
||||
CMyGeinsFPuql+S7u6HgjZcf9ZFH71sKoFoQytm30hAXB76GO06qi1jRW6o0miuGt/j/
|
||||
bb8qWAiAsGr34mHIbE5fBdkNOGcqW85oI78GolLqpROgn/42boEYxiGAQjybPtO4L84J
|
||||
wP2RBkHiQQGXUjL6b02tozCji1w2XdfYqtW8RteUs1pqYdXl4GUilMLt5C0d2bhSGksS
|
||||
3tMTFjuycbaj+F6QFCkQfEsHx/I7GjuD4mToLcYpzrNnmZZUidAoKuh+uin0cEVvnQ1j
|
||||
V8aA==
|
||||
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;
|
||||
h=to:from:subject:date:message-id:auto-submitted:sender:reply-to
|
||||
:mime-version:dkim-signature:dkim-signature:delivered-to;
|
||||
bh=dgRmOj3aABlB3SNw+xxlI8L9ugJFZ1WMJrtLw/W8tnA=;
|
||||
fh=5zy5Gi9ngAea7dC9ZKKPh/BZlFmotJq74g9KHrEIwaE=;
|
||||
b=QTAjqit0gYnuGa1lbO9RUXOVpyutliNo+tG6irWFsjGhnvMkis2KdLb6saYPnLCG7F
|
||||
rSRXvw0HwuaJfXAV3XvIT0pxTg3PXYnc8kt/F8OtG+LiakJbMV1soj8OJ+5lZPKFmvna
|
||||
i2T5mJjEknZsc9qWYmaAEVqIg71jhPH5CjJyehNhsIJ1/O9CH4VF8L0yv9KUMAA4tzog
|
||||
LfI+SpOE2z/wYuMDxi2Ld3FgaVCQgkMM2Tlys8P0DjCaewWeaZFmZKIEEZUbKWbrivTa
|
||||
RSO+Us+9yrt8hDdJuvtf9eXsGvuZtdj/2APRts/0cd7SFAQqRd0DnhGIHoXR74YVHaqi
|
||||
U7IQ==;
|
||||
darn=xinu.tv
|
||||
ARC-Authentication-Results: i=2; mx.google.com;
|
||||
dkim=pass header.i=@google.com header.s=20230601 header.b=zT2yUtVH;
|
||||
dkim=pass header.i=@gmail.com header.s=20230601 header.b=nmJW8N67;
|
||||
spf=pass (google.com: domain of tconvertino@gmail.com designates 209.85.220.73 as permitted sender) smtp.mailfrom=tconvertino@gmail.com;
|
||||
dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com;
|
||||
dara=pass header.i=@gmail.com
|
||||
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=1e100.net; s=20230601; t=1748873190; x=1749477990;
|
||||
h=to:from:subject:date:message-id:auto-submitted:sender:reply-to
|
||||
:mime-version:dkim-signature:dkim-signature:delivered-to
|
||||
:x-forwarded-for:x-forwarded-to:x-gm-message-state:from:to:cc
|
||||
:subject:date:message-id:reply-to;
|
||||
bh=dgRmOj3aABlB3SNw+xxlI8L9ugJFZ1WMJrtLw/W8tnA=;
|
||||
b=dBjp6JdmFUj0jKPDo9r2/xvfVSvxKaF15UYwYU7itdM18qpCnrgQdHMP2ST7EQBxou
|
||||
58yZfVjrx84gg9phedpVSg4SaBaPIhXsLuUeVQZtPd7J3WYiH4+OGcecjV+cD0dG0TUi
|
||||
o/FbZULNl3REysvoAj+AwUL/ny2FnNU4PIhkeSq+d6iNztkexIKLS8qWqHosenPlVX+E
|
||||
Z7OGQZpK6m1LB5UbCsaODQq5wbNIxlOxqTP1rCHe/hHk53ljiNegzaOS31mVvp1n8/g1
|
||||
pWIZltyZORs0zi6U9+mNd9ZbaeQjHqBrcb2bsTxCD+u0DBuF2RjLguS/feaB25TG8LAg
|
||||
szYg==
|
||||
X-Forwarded-Encrypted: i=2; AJvYcCXfGRAIDqrPsT1vzTMSiuMrlTj/DbRrr+8w7X+iLRH2XK/n8MZhV3UaT0Zia6c6jMrf3s3eHA==@xinu.tv
|
||||
X-Gm-Message-State: AOJu0YxOQEmNiUg4NKf4NM1BgQMqTJaFM6txPnL6u74ff1dZvoSgTC4d
|
||||
TtJJqfdHsajxloSGDsSPqIQ/M/Se/sfymEExFQxDXYA/XasA6+sdye/Ihl9QekGJK9jet1VtQ3r
|
||||
dcg89xnFcxezg3ji6xH8jnSULlp350K9K7LR0LfTQqg6e/BEKEF8XDaNgmJC+RQ==
|
||||
X-Received: by 2002:a05:6512:2246:b0:553:35bb:f7b7 with SMTP id 2adb3069b0e04-55342f92776mr2472199e87.32.1748873190333;
|
||||
Mon, 02 Jun 2025 07:06:30 -0700 (PDT)
|
||||
X-Forwarded-To: gmail@xinu.tv
|
||||
X-Forwarded-For: couchmoney@gmail.com gmail@xinu.tv
|
||||
Delivered-To: couchmoney@gmail.com
|
||||
Received: by 2002:ab3:7457:0:b0:2b1:14e:dc2b with SMTP id g23csp2818972lti;
|
||||
Mon, 2 Jun 2025 07:06:29 -0700 (PDT)
|
||||
X-Received: by 2002:a05:6602:6a8b:b0:86c:f898:74b8 with SMTP id ca18e2360f4ac-86d0521552emr1082401939f.10.1748873188734;
|
||||
Mon, 02 Jun 2025 07:06:28 -0700 (PDT)
|
||||
ARC-Seal: i=1; a=rsa-sha256; t=1748873188; cv=none;
|
||||
d=google.com; s=arc-20240605;
|
||||
b=d2PNXrTE3VYjml3FmbC5rBW6XnsyuyVO3lPyM6VoVKFcvZ7a8tDRB+sh1ibo0D5Nvg
|
||||
3i/Qon0RV401WFb9NQf5P048wpj19G8bOGPZUKMioBZcSxkr1RwH/GW6GBvGS+d+iqbW
|
||||
43KWc6Px7RGOEeYfp8D88CuJ/5kMcsLMfDV1FRHo6T+chVY6c9fQkHjRreSGQcFXglt5
|
||||
yaCpFKkAODO7rSHl2OW2kQ6eGgR0tUjb95+jdZXoU0GS3119CBYK9n9UhNaeXHIk/Zyy
|
||||
f08r4Ce/m3Y6ISr4ovXxDeYNpeeUN1HT3XVyCVQJHjfWrHypKTiOt4q6yBhCgOgZTXJq
|
||||
pL5A==;
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;
|
||||
h=to:from:subject:date:message-id:auto-submitted:sender:reply-to
|
||||
:mime-version:dkim-signature:dkim-signature;
|
||||
bh=dgRmOj3aABlB3SNw+xxlI8L9ugJFZ1WMJrtLw/W8tnA=;
|
||||
fh=mbzrMIWIgWMC0ni1xEx+ViW4J0RLAdLdPT2cX81nTlk=;
|
||||
b=YiMakYeE05UctWy9sW90/a3l1Hk1pAPv0+fpk5vmWrADcMwwI8cHVqBp+Nxds5psWa
|
||||
a/zrw9UlxV4HgjLUP+ella/pK8XxK+sitKg0IhPOntwKbq1KfTNheufh4HtWj5yWedHE
|
||||
sO/dVs6z/EW/gWrfBK/3JMgsnz3HrHmaoJ6caCaGI6t5jHxEXI+eJc5zILY+n0MdivkX
|
||||
tJOo0L1s/k6MAdyLr4/IVqpxdhXbUPq44twCBNheHd8T5w1DC9ZXcr54X79fW8Vzbm8/
|
||||
A++H3gnZRGtOayRySYQl04LFLk4YsisdhsKuaJV+WKYCW58wQqJT04mrVkx+m96qr1q0
|
||||
BQtw==;
|
||||
dara=google.com
|
||||
ARC-Authentication-Results: i=1; mx.google.com;
|
||||
dkim=pass header.i=@google.com header.s=20230601 header.b=zT2yUtVH;
|
||||
dkim=pass header.i=@gmail.com header.s=20230601 header.b=nmJW8N67;
|
||||
spf=pass (google.com: domain of tconvertino@gmail.com designates 209.85.220.73 as permitted sender) smtp.mailfrom=tconvertino@gmail.com;
|
||||
dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com;
|
||||
dara=pass header.i=@gmail.com
|
||||
Received: from mail-sor-f73.google.com (mail-sor-f73.google.com. [209.85.220.73])
|
||||
by mx.google.com with SMTPS id ca18e2360f4ac-86d0213d491sor465078439f.8.2025.06.02.07.06.28
|
||||
for <couchmoney@gmail.com>
|
||||
(Google Transport Security);
|
||||
Mon, 02 Jun 2025 07:06:28 -0700 (PDT)
|
||||
Received-SPF: pass (google.com: domain of tconvertino@gmail.com designates 209.85.220.73 as permitted sender) client-ip=209.85.220.73;
|
||||
Authentication-Results: mx.google.com;
|
||||
dkim=pass header.i=@google.com header.s=20230601 header.b=zT2yUtVH;
|
||||
dkim=pass header.i=@gmail.com header.s=20230601 header.b=nmJW8N67;
|
||||
spf=pass (google.com: domain of tconvertino@gmail.com designates 209.85.220.73 as permitted sender) smtp.mailfrom=tconvertino@gmail.com;
|
||||
dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com;
|
||||
dara=pass header.i=@gmail.com
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=google.com; s=20230601; t=1748873188; x=1749477988; dara=google.com;
|
||||
h=to:from:subject:date:message-id:auto-submitted:sender:reply-to
|
||||
:mime-version:from:to:cc:subject:date:message-id:reply-to;
|
||||
bh=dgRmOj3aABlB3SNw+xxlI8L9ugJFZ1WMJrtLw/W8tnA=;
|
||||
b=zT2yUtVHhNy5fFiy6YKzfYCQPlCnufAEoWmbvjvj7mFNYUlLJHZ5FUeNnDs06Z1icR
|
||||
bSVtejKixrz4hjFh9KeKvV9EQNGU7UFgySwqdy6szm+sHZQj+iJAXy85A1QaL6+0Swup
|
||||
2y8QsjVJ96uugM0SaAYZqe+lmLBk6zFWqkg0U37vgwOupAcNsNBd7tos7cxO5eK6Aops
|
||||
FJjr9JAD+ddX03ngH9zfnvlNV/+qbmiP6Hs8OmaJtZof2GLucpHgqUpIdolCh7F72v4p
|
||||
DibO4RShI/IQCw9ejZxhRPBPWQwIdOYLjD/sDunX63M4NCS/63jZfhwqsAVgtmN/cUGq
|
||||
spHQ==
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=gmail.com; s=20230601; t=1748873188; x=1749477988; dara=google.com;
|
||||
h=to:from:subject:date:message-id:auto-submitted:sender:reply-to
|
||||
:mime-version:from:to:cc:subject:date:message-id:reply-to;
|
||||
bh=dgRmOj3aABlB3SNw+xxlI8L9ugJFZ1WMJrtLw/W8tnA=;
|
||||
b=nmJW8N67IylgMNprzzf/IC7V2r7xeY0+8Bl0KcAak6Xly+IhVv3nyccvgdKsp+8Ccd
|
||||
NcikfVOtCsE3gTqviReUbTAKy7PyClAbBTEHC0Ne71549BN+v8zX64RpGDFJGX5pJMG5
|
||||
r0Ak88nxzjWkvDLhlnHmWdt/NggdQEI6T7oP4VZo0f0/Ym7g1WJhSItfdIhSRDNzK3ed
|
||||
WPRXUIb1sW3+N0My4Os6L4IA9kdRk5z0qpQxtsIL9N0dzv4q18q6eH3KfTzVPr59PsYT
|
||||
uSgkWoLQZdfA70MMlIRU5CnGbVDRH4TO/ib433vIblOmtLTkQ4EaOTzncbs0tovVes4z
|
||||
evsQ==
|
||||
X-Google-Smtp-Source: AGHT+IETNpLvkLm7t8VAdDcEcVtxFCttPh/uVZhoQCRlhUNlx9bmg67olJiD9EOND8g0z43NnM8iK4FxezZondExIawx
|
||||
MIME-Version: 1.0
|
||||
X-Received: by 2002:a05:6602:4183:b0:864:4a1b:dfc5 with SMTP id
|
||||
ca18e2360f4ac-86d052154eamr1431889339f.9.1748873188195; Mon, 02 Jun 2025
|
||||
07:06:28 -0700 (PDT)
|
||||
Reply-To: tconvertino@gmail.com
|
||||
Sender: Google Calendar <calendar-notification@google.com>
|
||||
Auto-Submitted: auto-generated
|
||||
Message-ID: <calendar-093be1c9-5d94-4994-8bc5-7daa1cfae47b@google.com>
|
||||
Date: Mon, 02 Jun 2025 14:06:28 +0000
|
||||
Subject: New event: Tamara and Scout in Alaska @ Tue Jun 24 - Mon Jun 30, 2025 (tconvertino@gmail.com)
|
||||
From: tconvertino@gmail.com
|
||||
To: couchmoney@gmail.com
|
||||
Content-Type: multipart/alternative; boundary="00000000000023c70606369745e9"
|
||||
|
||||
--00000000000023c70606369745e9
|
||||
Content-Type: text/plain; charset="UTF-8"; format=flowed; delsp=yes
|
||||
Content-Transfer-Encoding: base64
|
||||
|
||||
VGFtYXJhIGFuZCBTY291dCBpbiBBbGFza2ENClR1ZXNkYXkgSnVuIDI0IOKAkyBNb25kYXkgSnVu
|
||||
IDMwLCAyMDI1DQoNCg0KDQpPcmdhbml6ZXINCnRjb252ZXJ0aW5vQGdtYWlsLmNvbQ0KdGNvbnZl
|
||||
cnRpbm9AZ21haWwuY29tDQoNCn5+Ly9+fg0KSW52aXRhdGlvbiBmcm9tIEdvb2dsZSBDYWxlbmRh
|
||||
cjogaHR0cHM6Ly9jYWxlbmRhci5nb29nbGUuY29tL2NhbGVuZGFyLw0KDQpZb3UgYXJlIHJlY2Vp
|
||||
dmluZyB0aGlzIGVtYWlsIGJlY2F1c2UgeW91IGFyZSBzdWJzY3JpYmVkIHRvIGNhbGVuZGFyICAN
|
||||
Cm5vdGlmaWNhdGlvbnMuIFRvIHN0b3AgcmVjZWl2aW5nIHRoZXNlIGVtYWlscywgZ28gdG8gIA0K
|
||||
aHR0cHM6Ly9jYWxlbmRhci5nb29nbGUuY29tL2NhbGVuZGFyL3Ivc2V0dGluZ3MsIHNlbGVjdCB0
|
||||
aGlzIGNhbGVuZGFyLCBhbmQgIA0KY2hhbmdlICJPdGhlciBub3RpZmljYXRpb25zIi4NCg0KRm9y
|
||||
d2FyZGluZyB0aGlzIGludml0YXRpb24gY291bGQgYWxsb3cgYW55IHJlY2lwaWVudCB0byBzZW5k
|
||||
IGEgcmVzcG9uc2UgdG8gIA0KdGhlIG9yZ2FuaXplciwgYmUgYWRkZWQgdG8gdGhlIGd1ZXN0IGxp
|
||||
c3QsIGludml0ZSBvdGhlcnMgcmVnYXJkbGVzcyBvZiAgDQp0aGVpciBvd24gaW52aXRhdGlvbiBz
|
||||
dGF0dXMsIG9yIG1vZGlmeSB5b3VyIFJTVlAuDQoNCkxlYXJuIG1vcmUgaHR0cHM6Ly9zdXBwb3J0
|
||||
Lmdvb2dsZS5jb20vY2FsZW5kYXIvYW5zd2VyLzM3MTM1I2ZvcndhcmRpbmcNCg==
|
||||
--00000000000023c70606369745e9
|
||||
Content-Type: text/html; charset="UTF-8"
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
<!doctype html><html xmlns=3D"http://www.w3.org/1999/xhtml" xmlns:v=3D"urn:="...truncated for brevity...
|
||||
57
server/testdata/ical-example-1.ics
vendored
Normal file
57
server/testdata/ical-example-1.ics
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
BEGIN:VCALENDAR
|
||||
METHOD:REQUEST
|
||||
PRODID:Microsoft Exchange Server 2010
|
||||
VERSION:2.0
|
||||
BEGIN:VTIMEZONE
|
||||
TZID:Pacific Standard Time
|
||||
BEGIN:STANDARD
|
||||
DTSTART:16010101T020000
|
||||
TZOFFSETFROM:-0700
|
||||
TZOFFSETTO:-0800
|
||||
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=11
|
||||
END:STANDARD
|
||||
BEGIN:DAYLIGHT
|
||||
DTSTART:16010101T020000
|
||||
TZOFFSETFROM:-0800
|
||||
TZOFFSETTO:-0700
|
||||
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=2SU;BYMONTH=3
|
||||
END:DAYLIGHT
|
||||
END:VTIMEZONE
|
||||
BEGIN:VEVENT
|
||||
ORGANIZER;CN=Bill Thiede:mailto:wthiede@nvidia.com
|
||||
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=Bill:mailt
|
||||
o:couchmoney@gmail.com
|
||||
DESCRIPTION;LANGUAGE=en-US:\n
|
||||
UID:040000008200E00074C5B7101A82E00800000000A1458AEA8E4DDB01000000000000000
|
||||
010000000988BC323BE65A8458B718B5EF8FE8152
|
||||
SUMMARY;LANGUAGE=en-US:dentist night guard
|
||||
DTSTART;TZID=Pacific Standard Time:20250108T080000
|
||||
DTEND;TZID=Pacific Standard Time:20250108T090000
|
||||
CLASS:PUBLIC
|
||||
PRIORITY:5
|
||||
DTSTAMP:20241213T184408Z
|
||||
TRANSP:OPAQUE
|
||||
STATUS:CONFIRMED
|
||||
SEQUENCE:0
|
||||
LOCATION;LANGUAGE=en-US:
|
||||
X-MICROSOFT-CDO-APPT-SEQUENCE:0
|
||||
X-MICROSOFT-CDO-OWNERAPPTID:2123132523
|
||||
X-MICROSOFT-CDO-BUSYSTATUS:TENTATIVE
|
||||
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
|
||||
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
|
||||
X-MICROSOFT-CDO-IMPORTANCE:1
|
||||
X-MICROSOFT-CDO-INSTTYPE:0
|
||||
X-MICROSOFT-ONLINEMEETINGEXTERNALLINK:
|
||||
X-MICROSOFT-ONLINEMEETINGCONFLINK:
|
||||
X-MICROSOFT-DONOTFORWARDMEETING:FALSE
|
||||
X-MICROSOFT-DISALLOW-COUNTER:FALSE
|
||||
X-MICROSOFT-REQUESTEDATTENDANCEMODE:DEFAULT
|
||||
X-MICROSOFT-ISRESPONSEREQUESTED:TRUE
|
||||
X-MICROSOFT-LOCATIONS:[]
|
||||
BEGIN:VALARM
|
||||
DESCRIPTION:REMINDER
|
||||
TRIGGER;RELATED=START:-PT5M
|
||||
ACTION:DISPLAY
|
||||
END:VALARM
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
30
server/testdata/ical-example-2.ics
vendored
Normal file
30
server/testdata/ical-example-2.ics
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
BEGIN:VCALENDAR
|
||||
PRODID:-//Google Inc//Google Calendar 70.9054//EN
|
||||
VERSION:2.0
|
||||
CALSCALE:GREGORIAN
|
||||
METHOD:REPLY
|
||||
X-GOOGLE-CALID:g66m0feuqsao8l1c767pvvcg4k@group.calendar.google.com
|
||||
BEGIN:VEVENT
|
||||
DTSTART:20250813T010000Z
|
||||
DTEND:20250813T030000Z
|
||||
DTSTAMP:20250801T022550Z
|
||||
ORGANIZER;CN=Family:mailto:g66m0feuqsao8l1c767pvvcg4k@group.calendar.google
|
||||
.com
|
||||
UID:6os3ap346th6ab9nckp30b9kc8sm2bb160q3gb9l6lgm6or160rjee1mco@google.com
|
||||
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;CN=superm
|
||||
atute@gmail.com;X-NUM-GUESTS=0:mailto:supermatute@gmail.com
|
||||
X-GOOGLE-CONFERENCE:https://meet.google.com/dcu-hykx-vym
|
||||
CREATED:20250801T015712Z
|
||||
DESCRIPTION:-::~:~::~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~
|
||||
:~:~:~:~:~:~:~:~::~:~::-\nJoin with Google Meet: https://meet.google.com/dc
|
||||
u-hykx-vym\n\nLearn more about Meet at: https://support.google.com/a/users/
|
||||
answer/9282720\n\nPlease do not edit this section.\n-::~:~::~:~:~:~:~:~:~:~
|
||||
:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~::~:~::-
|
||||
LAST-MODIFIED:20250801T022549Z
|
||||
LOCATION:
|
||||
SEQUENCE:0
|
||||
STATUS:CONFIRMED
|
||||
SUMMARY:[tenative] dinner w/ amatute
|
||||
TRANSP:OPAQUE
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
9
server/testdata/ical-multiday.ics
vendored
Normal file
9
server/testdata/ical-multiday.ics
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
BEGIN:VCALENDAR
|
||||
VERSION:2.0
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Multi-day Event
|
||||
DTSTART;VALUE=DATE:20250828
|
||||
DTEND;VALUE=DATE:20250831
|
||||
DESCRIPTION:This event spans multiple days.
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
36
server/testdata/ical-straddle-real.ics
vendored
Normal file
36
server/testdata/ical-straddle-real.ics
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
BEGIN:VCALENDAR
|
||||
PRODID:-//Google Inc//Google Calendar 70.9054//EN
|
||||
VERSION:2.0
|
||||
CALSCALE:GREGORIAN
|
||||
METHOD:REQUEST
|
||||
BEGIN:VEVENT
|
||||
DTSTART;VALUE=DATE:20250830
|
||||
DTEND;VALUE=DATE:20250902
|
||||
DTSTAMP:20250819T183713Z
|
||||
ORGANIZER;CN=Bill Thiede:mailto:couchmoney@gmail.com
|
||||
UID:37kplskaimjnhdnt8r5ui9pv7f@google.com
|
||||
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
|
||||
TRUE;CN=bill@xinu.tv;X-NUM-GUESTS=0:mailto:bill@xinu.tv
|
||||
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;RSVP=TRUE
|
||||
;CN=Bill Thiede;X-NUM-GUESTS=0:mailto:couchmoney@gmail.com
|
||||
X-MICROSOFT-CDO-OWNERAPPTID:1427505964
|
||||
CREATED:20250819T183709Z
|
||||
DESCRIPTION:
|
||||
LAST-MODIFIED:20250819T183709Z
|
||||
LOCATION:
|
||||
SEQUENCE:0
|
||||
STATUS:CONFIRMED
|
||||
SUMMARY:Test Straddle Month
|
||||
TRANSP:TRANSPARENT
|
||||
BEGIN:VALARM
|
||||
ACTION:DISPLAY
|
||||
DESCRIPTION:This is an event reminder
|
||||
TRIGGER:-P0DT0H30M0S
|
||||
END:VALARM
|
||||
BEGIN:VALARM
|
||||
ACTION:DISPLAY
|
||||
DESCRIPTION:This is an event reminder
|
||||
TRIGGER:-P0DT7H30M0S
|
||||
END:VALARM
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
13
server/testdata/ical-straddle.ics
vendored
Normal file
13
server/testdata/ical-straddle.ics
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
BEGIN:VCALENDAR
|
||||
VERSION:2.0
|
||||
PRODID:-//Test Recurring Event//EN
|
||||
BEGIN:VEVENT
|
||||
UID:recurring-test-1@example.com
|
||||
DTSTART;VALUE=DATE:20250804
|
||||
DTEND;VALUE=DATE:20250805
|
||||
RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR;UNTIL=20250825T000000Z
|
||||
SUMMARY:Test Recurring Event (Mon, Wed, Fri)
|
||||
DESCRIPTION:This event recurs every Monday, Wednesday, and Friday in August 2025.
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
@@ -11,6 +11,10 @@ version.workspace = true
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
build-info = "0.0.40"
|
||||
letterbox-notmuch = { version = "0.10.6", path = "../notmuch", registry = "xinu" }
|
||||
serde = { version = "1.0.147", features = ["derive"] }
|
||||
build-info = "0.0.42"
|
||||
letterbox-notmuch = { path = "../notmuch", version = "0.17", registry = "xinu" }
|
||||
regex = "1.11.1"
|
||||
serde = { version = "1.0.219", features = ["derive"] }
|
||||
sqlx = "0.8.5"
|
||||
strum_macros = "0.27.1"
|
||||
tracing = "0.1.41"
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
use std::hash::{DefaultHasher, Hash, Hasher};
|
||||
use std::{
|
||||
convert::Infallible,
|
||||
hash::{DefaultHasher, Hash, Hasher},
|
||||
str::FromStr,
|
||||
};
|
||||
|
||||
use build_info::{BuildInfo, VersionControl};
|
||||
use letterbox_notmuch::SearchSummary;
|
||||
use regex::{RegexBuilder, RegexSetBuilder};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tracing::debug;
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct SearchResult {
|
||||
@@ -13,11 +19,20 @@ pub struct SearchResult {
|
||||
pub total: usize,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct Message {}
|
||||
#[derive(Serialize, Deserialize, Debug, strum_macros::Display)]
|
||||
pub enum WebsocketMessage {
|
||||
RefreshMessages,
|
||||
}
|
||||
|
||||
pub mod urls {
|
||||
pub const MOUNT_POINT: &'static str = "/api";
|
||||
pub fn view_original(host: Option<&str>, id: &str) -> String {
|
||||
if let Some(host) = host {
|
||||
format!("//{host}/api/original/{id}")
|
||||
} else {
|
||||
format!("/api/original/{id}")
|
||||
}
|
||||
}
|
||||
pub fn cid_prefix(host: Option<&str>, cid: &str) -> String {
|
||||
if let Some(host) = host {
|
||||
format!("//{host}/api/cid/{cid}/")
|
||||
@@ -56,3 +71,198 @@ pub fn compute_color(data: &str) -> String {
|
||||
data.hash(&mut hasher);
|
||||
format!("#{:06x}", hasher.finish() % (1 << 24))
|
||||
}
|
||||
|
||||
#[derive(
|
||||
Copy, Clone, Debug, Default, PartialEq, Eq, Hash, Ord, PartialOrd, Serialize, Deserialize,
|
||||
)]
|
||||
pub enum MatchType {
|
||||
From,
|
||||
Sender,
|
||||
To,
|
||||
Cc,
|
||||
Subject,
|
||||
ListId,
|
||||
DeliveredTo,
|
||||
XForwardedTo,
|
||||
ReplyTo,
|
||||
XOriginalTo,
|
||||
XSpam,
|
||||
Body,
|
||||
#[default]
|
||||
Unknown,
|
||||
}
|
||||
#[derive(Debug, Default, Serialize, Deserialize)]
|
||||
pub struct Match {
|
||||
pub match_type: MatchType,
|
||||
pub needle: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Serialize, Deserialize)]
|
||||
pub struct Rule {
|
||||
pub stop_on_match: bool,
|
||||
pub matches: Vec<Match>,
|
||||
pub tag: String,
|
||||
}
|
||||
impl Rule {
|
||||
pub fn is_match(&self, header_key: &str, header_value: &str) -> bool {
|
||||
let pats: Vec<_> = self
|
||||
.matches
|
||||
.iter()
|
||||
.filter_map(|m| match m.match_type {
|
||||
MatchType::To => Some("^(to|cc|bcc|x-original-to)$"),
|
||||
MatchType::From => Some("^from$"),
|
||||
MatchType::Sender => Some("^sender$"),
|
||||
MatchType::Subject => Some("^subject$"),
|
||||
MatchType::ListId => Some("^list-id$"),
|
||||
MatchType::XOriginalTo => Some("^x-original-to$"),
|
||||
MatchType::ReplyTo => Some("^reply-to$"),
|
||||
MatchType::XSpam => Some("^x-spam$"),
|
||||
MatchType::Body => None,
|
||||
c => panic!("TODO handle '{c:?}' match type"),
|
||||
})
|
||||
.collect();
|
||||
|
||||
let set = RegexSetBuilder::new(&pats)
|
||||
.case_insensitive(true)
|
||||
.build()
|
||||
.expect("failed to compile regex for matches");
|
||||
let matches: Vec<_> = set.matches(header_key).into_iter().collect();
|
||||
if !matches.is_empty() {
|
||||
//info!("matched key '{header_key}' '{header_value}'");
|
||||
for m_idx in matches {
|
||||
let needle = regex::escape(&self.matches[m_idx].needle);
|
||||
let pat = RegexBuilder::new(&needle)
|
||||
.case_insensitive(true)
|
||||
.build()
|
||||
.expect("failed to compile regex for needle");
|
||||
if pat.is_match(header_value) {
|
||||
debug!("{header_key} matched {header_value} against {needle}");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
mod matches {
|
||||
// From https://linux.die.net/man/5/procmailrc
|
||||
// If the regular expression contains '^TO_' it will be substituted by '(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope |Apparently(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?)'
|
||||
// If the regular expression contains '^TO' it will be substituted by '(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope |Apparently(-Resent)?)-To):(.*[^a-zA-Z])?)', which should catch all destination specifications containing a specific word.
|
||||
|
||||
pub const TO: &'static str = "TO";
|
||||
pub const CC: &'static str = "Cc";
|
||||
pub const TOCC: &'static str = "(TO|Cc)";
|
||||
pub const FROM: &'static str = "From";
|
||||
pub const SENDER: &'static str = "Sender";
|
||||
pub const SUBJECT: &'static str = "Subject";
|
||||
pub const DELIVERED_TO: &'static str = "Delivered-To";
|
||||
pub const X_FORWARDED_TO: &'static str = "X-Forwarded-To";
|
||||
pub const REPLY_TO: &'static str = "Reply-To";
|
||||
pub const X_ORIGINAL_TO: &'static str = "X-Original-To";
|
||||
pub const LIST_ID: &'static str = "List-ID";
|
||||
pub const X_SPAM: &'static str = "X-Spam";
|
||||
pub const X_SPAM_FLAG: &'static str = "X-Spam-Flag";
|
||||
}
|
||||
|
||||
impl FromStr for Match {
|
||||
type Err = Infallible;
|
||||
|
||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||
// Examples:
|
||||
// "* 1^0 ^TOsonyrewards.com@xinu.tv"
|
||||
// "* ^TOsonyrewards.com@xinu.tv"
|
||||
let mut it = s.split_whitespace().skip(1);
|
||||
let mut needle = it.next().unwrap();
|
||||
if needle == "1^0" {
|
||||
needle = it.next().unwrap();
|
||||
}
|
||||
let mut needle = vec![needle];
|
||||
needle.extend(it);
|
||||
let needle = needle.join(" ");
|
||||
let first = needle.chars().nth(0).unwrap_or(' ');
|
||||
use matches::*;
|
||||
if first == '^' {
|
||||
let needle = &needle[1..];
|
||||
if needle.starts_with(TO) {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::To,
|
||||
needle: cleanup_match(TO, needle),
|
||||
});
|
||||
} else if needle.starts_with(FROM) {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::From,
|
||||
needle: cleanup_match(FROM, needle),
|
||||
});
|
||||
} else if needle.starts_with(CC) {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::Cc,
|
||||
needle: cleanup_match(CC, needle),
|
||||
});
|
||||
} else if needle.starts_with(TOCC) {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::To,
|
||||
needle: cleanup_match(TOCC, needle),
|
||||
});
|
||||
} else if needle.starts_with(SENDER) {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::Sender,
|
||||
needle: cleanup_match(SENDER, needle),
|
||||
});
|
||||
} else if needle.starts_with(SUBJECT) {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::Subject,
|
||||
needle: cleanup_match(SUBJECT, needle),
|
||||
});
|
||||
} else if needle.starts_with(X_ORIGINAL_TO) {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::XOriginalTo,
|
||||
needle: cleanup_match(X_ORIGINAL_TO, needle),
|
||||
});
|
||||
} else if needle.starts_with(LIST_ID) {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::ListId,
|
||||
needle: cleanup_match(LIST_ID, needle),
|
||||
});
|
||||
} else if needle.starts_with(REPLY_TO) {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::ReplyTo,
|
||||
needle: cleanup_match(REPLY_TO, needle),
|
||||
});
|
||||
} else if needle.starts_with(X_SPAM_FLAG) {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::XSpam,
|
||||
needle: '*'.to_string(),
|
||||
});
|
||||
} else if needle.starts_with(X_SPAM) {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::XSpam,
|
||||
needle: '*'.to_string(),
|
||||
});
|
||||
} else if needle.starts_with(DELIVERED_TO) {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::DeliveredTo,
|
||||
needle: cleanup_match(DELIVERED_TO, needle),
|
||||
});
|
||||
} else if needle.starts_with(X_FORWARDED_TO) {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::XForwardedTo,
|
||||
needle: cleanup_match(X_FORWARDED_TO, needle),
|
||||
});
|
||||
} else {
|
||||
unreachable!("needle: '{needle}'")
|
||||
}
|
||||
} else {
|
||||
return Ok(Match {
|
||||
match_type: MatchType::Body,
|
||||
needle: cleanup_match("", &needle),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
fn unescape(s: &str) -> String {
|
||||
s.replace('\\', "")
|
||||
}
|
||||
pub fn cleanup_match(prefix: &str, s: &str) -> String {
|
||||
unescape(&s[prefix.len()..]).replace(".*", "")
|
||||
}
|
||||
|
||||
@@ -9,47 +9,50 @@ repository.workspace = true
|
||||
version.workspace = true
|
||||
|
||||
[build-dependencies]
|
||||
build-info-build = "0.0.40"
|
||||
build-info-build = "0.0.42"
|
||||
|
||||
[dev-dependencies]
|
||||
wasm-bindgen-test = "0.3.33"
|
||||
#wasm-bindgen-test = "0.3.50"
|
||||
|
||||
[dependencies]
|
||||
console_error_panic_hook = "0.1.7"
|
||||
log = "0.4.17"
|
||||
log = "0.4.27"
|
||||
seed = { version = "0.10.0", features = ["routing"] }
|
||||
#seed = "0.9.2"
|
||||
console_log = { version = "0.1.0", registry = "xinu" }
|
||||
serde = { version = "1.0.147", features = ["derive"] }
|
||||
console_log = { version = "0.1.4", registry = "xinu" }
|
||||
serde = { version = "1.0.219", features = ["derive"] }
|
||||
itertools = "0.14.0"
|
||||
serde_json = { version = "1.0.93", features = ["unbounded_depth"] }
|
||||
chrono = "0.4.31"
|
||||
graphql_client = "0.14.0"
|
||||
thiserror = "2.0.0"
|
||||
serde_json = { version = "1.0.140", features = ["unbounded_depth"] }
|
||||
chrono = "0.4.40"
|
||||
graphql_client = "0.16.0"
|
||||
thiserror = "2.0.12"
|
||||
gloo-net = { version = "0.6.0", features = ["json", "serde_json"] }
|
||||
human_format = "1.1.0"
|
||||
build-info = "0.0.40"
|
||||
build-info = "0.0.42"
|
||||
wasm-bindgen = "=0.2.100"
|
||||
uuid = { version = "1.13.1", features = [
|
||||
uuid = { version = "1.16.0", features = [
|
||||
"js",
|
||||
] } # direct dep to set js feature, prevents Rng issues
|
||||
letterbox-shared = { version = "0.10.6", path = "../shared", registry = "xinu" }
|
||||
letterbox-notmuch = { version = "0.10.6", path = "../notmuch", registry = "xinu" }
|
||||
seed_hooks = { version = "0.4.0", registry = "xinu" }
|
||||
letterbox-shared = { path = "../shared/", version = "0.17", registry = "xinu" }
|
||||
seed_hooks = { version = "0.4.1", registry = "xinu" }
|
||||
strum_macros = "0.27.1"
|
||||
gloo-console = "0.3.0"
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||
wasm-sockets = "1.0.0"
|
||||
|
||||
[package.metadata.wasm-pack.profile.release]
|
||||
wasm-opt = ['-Os']
|
||||
|
||||
[dependencies.web-sys]
|
||||
version = "0.3.58"
|
||||
version = "0.3.77"
|
||||
features = [
|
||||
"Clipboard",
|
||||
"DomRect",
|
||||
"Element",
|
||||
"History",
|
||||
"MediaQueryList",
|
||||
"Navigator",
|
||||
"Window",
|
||||
"History",
|
||||
"Performance",
|
||||
"ScrollRestoration",
|
||||
"Window",
|
||||
]
|
||||
|
||||
@@ -6,9 +6,16 @@ release = false
|
||||
address = "0.0.0.0"
|
||||
port = 6758
|
||||
|
||||
[[proxy]]
|
||||
ws = true
|
||||
backend = "ws://localhost:9345/api/ws"
|
||||
|
||||
[[proxy]]
|
||||
backend = "http://localhost:9345/api/"
|
||||
|
||||
[[proxy]]
|
||||
backend = "http://localhost:9345/notification/"
|
||||
|
||||
[[hooks]]
|
||||
stage = "pre_build"
|
||||
command = "printf"
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
},
|
||||
{
|
||||
"args": [],
|
||||
"description": "Indicates that an Input Object is a OneOf Input Object (and thus requires\n exactly one of its field be provided)",
|
||||
"description": "Indicates that an Input Object is a OneOf Input Object (and thus requires exactly one of its field be provided)",
|
||||
"locations": [
|
||||
"INPUT_OBJECT"
|
||||
],
|
||||
@@ -107,12 +107,14 @@
|
||||
}
|
||||
],
|
||||
"mutationType": {
|
||||
"name": "Mutation"
|
||||
"name": "MutationRoot"
|
||||
},
|
||||
"queryType": {
|
||||
"name": "QueryRoot"
|
||||
},
|
||||
"subscriptionType": null,
|
||||
"subscriptionType": {
|
||||
"name": "SubscriptionRoot"
|
||||
},
|
||||
"types": [
|
||||
{
|
||||
"description": null,
|
||||
@@ -314,6 +316,16 @@
|
||||
"name": "Corpus",
|
||||
"possibleTypes": null
|
||||
},
|
||||
{
|
||||
"description": "Implement the DateTime<Utc> scalar\n\nThe input/output is a string in RFC3339 format.",
|
||||
"enumValues": null,
|
||||
"fields": null,
|
||||
"inputFields": null,
|
||||
"interfaces": null,
|
||||
"kind": "SCALAR",
|
||||
"name": "DateTime",
|
||||
"possibleTypes": null
|
||||
},
|
||||
{
|
||||
"description": null,
|
||||
"enumValues": [
|
||||
@@ -969,6 +981,51 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"description": null,
|
||||
"name": "query",
|
||||
"type": {
|
||||
"kind": "NON_NULL",
|
||||
"name": null,
|
||||
"ofType": {
|
||||
"kind": "SCALAR",
|
||||
"name": "String",
|
||||
"ofType": null
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"defaultValue": null,
|
||||
"description": null,
|
||||
"name": "wakeTime",
|
||||
"type": {
|
||||
"kind": "NON_NULL",
|
||||
"name": null,
|
||||
"ofType": {
|
||||
"kind": "SCALAR",
|
||||
"name": "DateTime",
|
||||
"ofType": null
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"deprecationReason": null,
|
||||
"description": null,
|
||||
"isDeprecated": false,
|
||||
"name": "snooze",
|
||||
"type": {
|
||||
"kind": "NON_NULL",
|
||||
"name": null,
|
||||
"ofType": {
|
||||
"kind": "SCALAR",
|
||||
"name": "Boolean",
|
||||
"ofType": null
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"args": [],
|
||||
"deprecationReason": null,
|
||||
@@ -989,7 +1046,7 @@
|
||||
"inputFields": null,
|
||||
"interfaces": [],
|
||||
"kind": "OBJECT",
|
||||
"name": "Mutation",
|
||||
"name": "MutationRoot",
|
||||
"possibleTypes": null
|
||||
},
|
||||
{
|
||||
@@ -1474,6 +1531,33 @@
|
||||
"name": "String",
|
||||
"possibleTypes": null
|
||||
},
|
||||
{
|
||||
"description": null,
|
||||
"enumValues": null,
|
||||
"fields": [
|
||||
{
|
||||
"args": [],
|
||||
"deprecationReason": null,
|
||||
"description": null,
|
||||
"isDeprecated": false,
|
||||
"name": "values",
|
||||
"type": {
|
||||
"kind": "NON_NULL",
|
||||
"name": null,
|
||||
"ofType": {
|
||||
"kind": "SCALAR",
|
||||
"name": "Int",
|
||||
"ofType": null
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"inputFields": null,
|
||||
"interfaces": [],
|
||||
"kind": "OBJECT",
|
||||
"name": "SubscriptionRoot",
|
||||
"possibleTypes": null
|
||||
},
|
||||
{
|
||||
"description": null,
|
||||
"enumValues": null,
|
||||
|
||||
4
web/graphql/snooze.graphql
Normal file
4
web/graphql/snooze.graphql
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
mutation SnoozeMutation($query: String!, $wakeTime: DateTime!) {
|
||||
snooze(query: $query, wakeTime: $wakeTime)
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
DEV_HOST=localhost
|
||||
DEV_PORT=9345
|
||||
graphql-client introspect-schema http://${DEV_HOST:?}:${DEV_PORT:?}/api/graphql --output schema.json
|
||||
graphql-client introspect-schema http://${DEV_HOST:?}:${DEV_PORT:?}/api/graphql/ --output schema.json
|
||||
git diff schema.json
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css"
|
||||
integrity="sha512-Evv84Mr4kqVGRNSgIGL/F/aIDqQb7xQ2vcrdIwxfjThSH8CSR7PBEakCr51Ck+w+/U6swU2Im1vVX0SVk9ABhg=="
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css"
|
||||
integrity="sha512-2SwdPD6INVrV/lHTZbO2nodKhrnDdJK9/kg2XD1r9uGqPo1cUbujc+IYdlYdEErWNu69gVcYgdxlmVmzTWnetw=="
|
||||
crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
<link rel="icon" href="https://static.xinu.tv/favicon/letterbox.svg" />
|
||||
<!-- tall thin font for user icon -->
|
||||
@@ -16,10 +16,11 @@
|
||||
<link data-trunk rel="css" href="static/vars.css" />
|
||||
<link data-trunk rel="tailwind-css" href="./src/tailwind.css" />
|
||||
<link data-trunk rel="css" href="static/overrides.css" />
|
||||
<link data-trunk rel="css" href="static/email-specific.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<section id="app"></section>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
use chrono::Utc;
|
||||
use gloo_net::{http::Request, Error};
|
||||
use graphql_client::GraphQLQuery;
|
||||
use serde::{de::DeserializeOwned, Serialize};
|
||||
|
||||
type DateTime = chrono::DateTime<Utc>;
|
||||
// The paths are relative to the directory where your `Cargo.toml` is located.
|
||||
// Both json and the GraphQL schema language are supported as sources for the schema
|
||||
#[derive(GraphQLQuery)]
|
||||
@@ -52,6 +54,14 @@ pub struct AddTagMutation;
|
||||
)]
|
||||
pub struct RemoveTagMutation;
|
||||
|
||||
#[derive(GraphQLQuery)]
|
||||
#[graphql(
|
||||
schema_path = "graphql/schema.json",
|
||||
query_path = "graphql/snooze.graphql",
|
||||
response_derives = "Debug"
|
||||
)]
|
||||
pub struct SnoozeMutation;
|
||||
|
||||
#[derive(GraphQLQuery)]
|
||||
#[graphql(
|
||||
schema_path = "graphql/schema.json",
|
||||
|
||||
@@ -11,6 +11,7 @@ mod consts;
|
||||
mod graphql;
|
||||
mod state;
|
||||
mod view;
|
||||
mod websocket;
|
||||
|
||||
fn main() {
|
||||
// This provides better error messages in debug mode.
|
||||
|
||||
122
web/src/state.rs
122
web/src/state.rs
@@ -1,6 +1,8 @@
|
||||
use std::collections::HashSet;
|
||||
|
||||
use chrono::{DateTime, Utc};
|
||||
use graphql_client::GraphQLQuery;
|
||||
use letterbox_shared::WebsocketMessage;
|
||||
use log::{debug, error, info, warn};
|
||||
use seed::{prelude::*, *};
|
||||
use thiserror::Error;
|
||||
@@ -11,6 +13,7 @@ use crate::{
|
||||
consts::SEARCH_RESULTS_PER_PAGE,
|
||||
graphql,
|
||||
graphql::{front_page_query::*, send_graphql, show_thread_query::*},
|
||||
websocket,
|
||||
};
|
||||
|
||||
/// Used to fake the unread string while in development
|
||||
@@ -38,11 +41,11 @@ pub fn init(url: Url, orders: &mut impl Orders<Msg>) -> Model {
|
||||
if url.hash().is_none() {
|
||||
orders.request_url(urls::search(unread_query(), 0));
|
||||
} else {
|
||||
orders.request_url(url);
|
||||
orders.request_url(url.clone());
|
||||
};
|
||||
// TODO(wathiede): only do this while viewing the index? Or maybe add a new message that force
|
||||
// 'notmuch new' on the server periodically?
|
||||
orders.stream(streams::interval(30_000, || Msg::RefreshStart));
|
||||
//orders.stream(streams::interval(30_000, || Msg::RefreshStart));
|
||||
orders.subscribe(Msg::OnUrlChanged);
|
||||
orders.stream(streams::window_event(Ev::Scroll, |_| Msg::WindowScrolled));
|
||||
|
||||
@@ -60,6 +63,7 @@ pub fn init(url: Url, orders: &mut impl Orders<Msg>) -> Model {
|
||||
},
|
||||
catchup: None,
|
||||
last_url: Url::current(),
|
||||
websocket: websocket::init("/api/ws", &mut orders.proxy(Msg::WebSocket)),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,10 +73,6 @@ fn on_url_changed(old: &Url, mut new: Url) -> Msg {
|
||||
if did_change {
|
||||
messages.push(Msg::ScrollToTop)
|
||||
}
|
||||
info!(
|
||||
"url changed\nold '{old}'\nnew '{new}', history {}",
|
||||
history().length().unwrap_or(0)
|
||||
);
|
||||
let hpp = new.remaining_hash_path_parts();
|
||||
let msg = match hpp.as_slice() {
|
||||
["t", tid] => Msg::ShowThreadRequest {
|
||||
@@ -260,6 +260,29 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
||||
Msg::GoToSearchResults
|
||||
});
|
||||
}
|
||||
Msg::Snooze(query, wake_time) => {
|
||||
let is_catchup = model.catchup.is_some();
|
||||
orders.skip().perform_cmd(async move {
|
||||
let res: Result<
|
||||
graphql_client::Response<graphql::snooze_mutation::ResponseData>,
|
||||
gloo_net::Error,
|
||||
> = send_graphql(graphql::SnoozeMutation::build_query(
|
||||
graphql::snooze_mutation::Variables {
|
||||
query: query.clone(),
|
||||
wake_time,
|
||||
},
|
||||
))
|
||||
.await;
|
||||
if let Err(e) = res {
|
||||
error!("Failed to snooze {query} until {wake_time}: {e}");
|
||||
}
|
||||
if is_catchup {
|
||||
Msg::CatchupMarkAsRead
|
||||
} else {
|
||||
Msg::GoToSearchResults
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Msg::FrontPageRequest {
|
||||
query,
|
||||
@@ -268,6 +291,7 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
||||
first,
|
||||
last,
|
||||
} => {
|
||||
model.refreshing_state = RefreshingState::Loading;
|
||||
let (after, before, first, last) = match (after.as_ref(), before.as_ref(), first, last)
|
||||
{
|
||||
// If no pagination set, set reasonable defaults
|
||||
@@ -293,25 +317,32 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
||||
});
|
||||
}
|
||||
Msg::FrontPageResult(Err(e)) => {
|
||||
error!("error FrontPageResult: {e:?}");
|
||||
let msg = format!("error FrontPageResult: {e:?}");
|
||||
error!("{msg}");
|
||||
model.refreshing_state = RefreshingState::Error(msg);
|
||||
}
|
||||
Msg::FrontPageResult(Ok(graphql_client::Response {
|
||||
data: None,
|
||||
errors: None,
|
||||
..
|
||||
})) => {
|
||||
error!("FrontPageResult no data or errors, should not happen");
|
||||
let msg = format!("FrontPageResult no data or errors, should not happen");
|
||||
error!("{msg}");
|
||||
model.refreshing_state = RefreshingState::Error(msg);
|
||||
}
|
||||
Msg::FrontPageResult(Ok(graphql_client::Response {
|
||||
data: None,
|
||||
errors: Some(e),
|
||||
..
|
||||
})) => {
|
||||
error!("FrontPageResult error: {e:?}");
|
||||
let msg = format!("FrontPageResult error: {e:?}");
|
||||
error!("{msg}");
|
||||
model.refreshing_state = RefreshingState::Error(msg);
|
||||
}
|
||||
Msg::FrontPageResult(Ok(graphql_client::Response {
|
||||
data: Some(data), ..
|
||||
})) => {
|
||||
model.refreshing_state = RefreshingState::None;
|
||||
model.tags = Some(
|
||||
data.tags
|
||||
.into_iter()
|
||||
@@ -351,6 +382,7 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
||||
}
|
||||
|
||||
Msg::ShowThreadRequest { thread_id } => {
|
||||
model.refreshing_state = RefreshingState::Loading;
|
||||
orders.skip().perform_cmd(async move {
|
||||
Msg::ShowThreadResult(
|
||||
send_graphql(graphql::ShowThreadQuery::build_query(
|
||||
@@ -363,6 +395,7 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
||||
Msg::ShowThreadResult(Ok(graphql_client::Response {
|
||||
data: Some(data), ..
|
||||
})) => {
|
||||
model.refreshing_state = RefreshingState::None;
|
||||
model.tags = Some(
|
||||
data.tags
|
||||
.into_iter()
|
||||
@@ -402,9 +435,12 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
||||
orders.send_msg(Msg::WindowScrolled);
|
||||
}
|
||||
Msg::ShowThreadResult(bad) => {
|
||||
error!("show_thread_query error: {bad:#?}");
|
||||
let msg = format!("show_thread_query error: {bad:#?}");
|
||||
error!("{msg}");
|
||||
model.refreshing_state = RefreshingState::Error(msg);
|
||||
}
|
||||
Msg::CatchupRequest { query } => {
|
||||
model.refreshing_state = RefreshingState::Loading;
|
||||
orders.perform_cmd(async move {
|
||||
Msg::CatchupResult(
|
||||
send_graphql::<_, graphql::catchup_query::ResponseData>(
|
||||
@@ -419,6 +455,7 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
||||
Msg::CatchupResult(Ok(graphql_client::Response {
|
||||
data: Some(data), ..
|
||||
})) => {
|
||||
model.refreshing_state = RefreshingState::None;
|
||||
let items = data.catchup;
|
||||
if items.is_empty() {
|
||||
orders.send_msg(Msg::GoToSearchResults);
|
||||
@@ -434,7 +471,9 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
||||
}
|
||||
}
|
||||
Msg::CatchupResult(bad) => {
|
||||
error!("catchup_query error: {bad:#?}");
|
||||
let msg = format!("catchup_query error: {bad:#?}");
|
||||
error!("{msg}");
|
||||
model.refreshing_state = RefreshingState::Error(msg);
|
||||
}
|
||||
Msg::SelectionSetNone => {
|
||||
if let Context::SearchResult {
|
||||
@@ -550,7 +589,6 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
||||
});
|
||||
}
|
||||
Msg::ScrollToTop => {
|
||||
info!("scrolling to the top");
|
||||
web_sys::window().unwrap().scroll_to_with_x_and_y(0., 0.);
|
||||
}
|
||||
Msg::WindowScrolled => {
|
||||
@@ -617,8 +655,35 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
||||
}
|
||||
Msg::CatchupKeepUnread => {
|
||||
if let Some(thread_id) = current_thread_id(&model.context) {
|
||||
orders.send_msg(Msg::SetUnread(thread_id, true));
|
||||
};
|
||||
if let Context::ThreadResult {
|
||||
thread:
|
||||
ShowThreadQueryThread::EmailThread(ShowThreadQueryThreadOnEmailThread {
|
||||
messages,
|
||||
..
|
||||
}),
|
||||
..
|
||||
} = &model.context
|
||||
{
|
||||
//orders.send_msg(Msg::SetUnread(thread_id, false));
|
||||
let unread_messages: Vec<_> = messages
|
||||
.iter()
|
||||
.filter(|msg| msg.tags.iter().any(|t| t == "unread"))
|
||||
.map(|msg| &msg.id)
|
||||
.collect();
|
||||
if unread_messages.is_empty() {
|
||||
// All messages are read, so mark them all unread
|
||||
orders.send_msg(Msg::SetUnread(thread_id, true));
|
||||
} else {
|
||||
// Do nothing if there are some messages unread
|
||||
}
|
||||
} else {
|
||||
// News post, not email, just mark unread
|
||||
orders.send_msg(Msg::SetUnread(thread_id, true));
|
||||
};
|
||||
} else {
|
||||
// This shouldn't happen
|
||||
warn!("no current thread_id");
|
||||
}
|
||||
orders.send_msg(Msg::CatchupNext);
|
||||
}
|
||||
Msg::CatchupMarkAsRead => {
|
||||
@@ -633,7 +698,15 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
||||
orders.send_msg(Msg::GoToSearchResults);
|
||||
return;
|
||||
};
|
||||
let Some(idx) = catchup.items.iter().position(|i| !i.seen) else {
|
||||
let Some(thread_id) = current_thread_id(&model.context) else {
|
||||
return;
|
||||
};
|
||||
let Some(idx) = catchup
|
||||
.items
|
||||
.iter()
|
||||
.inspect(|i| info!("i {i:?} thread_id {thread_id}"))
|
||||
.position(|i| i.id == thread_id)
|
||||
else {
|
||||
// All items have been seen
|
||||
orders.send_msg(Msg::CatchupExit);
|
||||
orders.send_msg(Msg::GoToSearchResults);
|
||||
@@ -654,6 +727,18 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
||||
orders.send_msg(Msg::ScrollToTop);
|
||||
model.catchup = None;
|
||||
}
|
||||
|
||||
Msg::WebSocket(ws) => {
|
||||
websocket::update(ws, &mut model.websocket, &mut orders.proxy(Msg::WebSocket));
|
||||
while let Some(msg) = model.websocket.updates.pop_front() {
|
||||
orders.send_msg(Msg::WebsocketMessage(msg));
|
||||
}
|
||||
}
|
||||
Msg::WebsocketMessage(msg) => {
|
||||
match msg {
|
||||
WebsocketMessage::RefreshMessages => orders.send_msg(Msg::Refresh),
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -686,6 +771,7 @@ pub struct Model {
|
||||
pub versions: Version,
|
||||
pub catchup: Option<Catchup>,
|
||||
pub last_url: Url,
|
||||
pub websocket: websocket::Model,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -726,6 +812,7 @@ pub struct Catchup {
|
||||
pub items: Vec<CatchupItem>,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct CatchupItem {
|
||||
pub id: String,
|
||||
pub seen: bool,
|
||||
@@ -759,12 +846,14 @@ pub enum Msg {
|
||||
NextPage,
|
||||
PreviousPage,
|
||||
GoToSearchResults,
|
||||
|
||||
UpdateQuery(String),
|
||||
SearchQuery(String),
|
||||
|
||||
SetUnread(String, bool),
|
||||
AddTag(String, String),
|
||||
RemoveTag(String, String),
|
||||
Snooze(String, DateTime<Utc>),
|
||||
|
||||
FrontPageRequest {
|
||||
query: String,
|
||||
@@ -815,4 +904,7 @@ pub enum Msg {
|
||||
CatchupMarkAsRead,
|
||||
CatchupNext,
|
||||
CatchupExit,
|
||||
|
||||
WebSocket(websocket::Msg),
|
||||
WebsocketMessage(WebsocketMessage),
|
||||
}
|
||||
|
||||
@@ -78,13 +78,16 @@ mod tw_classes {
|
||||
}
|
||||
|
||||
pub fn view(model: &Model) -> Node<Msg> {
|
||||
let is_loading = match model.refreshing_state {
|
||||
RefreshingState::Loading => true,
|
||||
_ => false,
|
||||
};
|
||||
match &model.context {
|
||||
Context::None => normal_view(
|
||||
div![h1!["Loading"]],
|
||||
&model.versions,
|
||||
&model.query,
|
||||
&model.refreshing_state,
|
||||
model.read_completion_ratio,
|
||||
&model.tags,
|
||||
),
|
||||
Context::ThreadResult {
|
||||
@@ -93,17 +96,23 @@ pub fn view(model: &Model) -> Node<Msg> {
|
||||
} => {
|
||||
if let Some(catchup) = &model.catchup {
|
||||
catchup_view(
|
||||
thread(thread_data, open_messages, &model.content_el, true),
|
||||
thread(thread_data, open_messages, &model.content_el, true, 0.),
|
||||
&catchup.items,
|
||||
is_loading,
|
||||
model.read_completion_ratio,
|
||||
)
|
||||
} else {
|
||||
normal_view(
|
||||
thread(thread_data, open_messages, &model.content_el, false),
|
||||
thread(
|
||||
thread_data,
|
||||
open_messages,
|
||||
&model.content_el,
|
||||
false,
|
||||
model.read_completion_ratio,
|
||||
),
|
||||
&model.versions,
|
||||
&model.query,
|
||||
&model.refreshing_state,
|
||||
model.read_completion_ratio,
|
||||
&model.tags,
|
||||
)
|
||||
}
|
||||
@@ -114,17 +123,17 @@ pub fn view(model: &Model) -> Node<Msg> {
|
||||
} => {
|
||||
if let Some(catchup) = &model.catchup {
|
||||
catchup_view(
|
||||
news_post(post, &model.content_el, true),
|
||||
news_post(post, &model.content_el, true, 0.),
|
||||
&catchup.items,
|
||||
is_loading,
|
||||
model.read_completion_ratio,
|
||||
)
|
||||
} else {
|
||||
normal_view(
|
||||
news_post(post, &model.content_el, false),
|
||||
news_post(post, &model.content_el, false, model.read_completion_ratio),
|
||||
&model.versions,
|
||||
&model.query,
|
||||
&model.refreshing_state,
|
||||
model.read_completion_ratio,
|
||||
&model.tags,
|
||||
)
|
||||
}
|
||||
@@ -140,7 +149,6 @@ pub fn view(model: &Model) -> Node<Msg> {
|
||||
&model.versions,
|
||||
&model.query,
|
||||
&model.refreshing_state,
|
||||
model.read_completion_ratio,
|
||||
&model.tags,
|
||||
),
|
||||
}
|
||||
@@ -151,7 +159,6 @@ fn normal_view(
|
||||
versions: &Version,
|
||||
query: &str,
|
||||
refreshing_state: &RefreshingState,
|
||||
read_completion_ratio: f64,
|
||||
tags: &Option<Vec<Tag>>,
|
||||
) -> Node<Msg> {
|
||||
div![
|
||||
@@ -178,13 +185,13 @@ fn normal_view(
|
||||
content,
|
||||
view_header(query, refreshing_state, false),
|
||||
],
|
||||
reading_progress(read_completion_ratio),
|
||||
]
|
||||
}
|
||||
|
||||
fn catchup_view(
|
||||
content: Node<Msg>,
|
||||
items: &[CatchupItem],
|
||||
is_loading: bool,
|
||||
read_completion_ratio: f64,
|
||||
) -> Node<Msg> {
|
||||
div![
|
||||
@@ -201,13 +208,34 @@ fn catchup_view(
|
||||
"bg-black/50",
|
||||
],
|
||||
div![
|
||||
C!["absolute", "top-0", "right-4", "text-gray-500", "p-4"],
|
||||
span![i![C!["fas", "fa-x"]]],
|
||||
ev(Ev::Click, move |_| Msg::CatchupExit)
|
||||
C!["absolute", "top-0", "left-4", "text-green-200", "p-4"],
|
||||
IF!(is_loading=>span![i![C!["animate-spin", "fas", "fa-spinner"]]])
|
||||
],
|
||||
h1![
|
||||
C!["text-center"],
|
||||
format!("{} left ", items.iter().filter(|i| !i.seen).count(),)
|
||||
],
|
||||
div![
|
||||
C!["absolute", "top-0", "right-4", "text-gray-500", "p-4"],
|
||||
span![i![C!["fas", "fa-x"]]],
|
||||
ev(Ev::Click, move |_| Msg::CatchupExit)
|
||||
],
|
||||
div![
|
||||
C![
|
||||
"absolute",
|
||||
"left-0",
|
||||
"right-0",
|
||||
"bottom-0",
|
||||
"w-full",
|
||||
"h-1",
|
||||
"bg-gray-200"
|
||||
],
|
||||
div![
|
||||
C!["h-1", "bg-green-500"],
|
||||
style! {
|
||||
St::Width => format!("{}%", read_completion_ratio*100.)
|
||||
}
|
||||
]
|
||||
]
|
||||
],
|
||||
div![C!["mt-12", "mb-20"], content],
|
||||
@@ -247,7 +275,6 @@ fn catchup_view(
|
||||
ev(Ev::Click, |_| Msg::CatchupMarkAsRead)
|
||||
]
|
||||
],
|
||||
reading_progress(read_completion_ratio)
|
||||
]
|
||||
}
|
||||
|
||||
@@ -263,74 +290,108 @@ fn search_results(
|
||||
} else {
|
||||
set_title(query);
|
||||
}
|
||||
let rows = results.iter().map(|r| {
|
||||
let tid = r.thread.clone();
|
||||
let check_tid = r.thread.clone();
|
||||
let datetime = human_age(r.timestamp as i64);
|
||||
let unread_idx = r.tags.iter().position(|e| e == &"unread");
|
||||
let mut tags = r.tags.clone();
|
||||
if let Some(idx) = unread_idx {
|
||||
tags.remove(idx);
|
||||
};
|
||||
let is_unread = unread_idx.is_some();
|
||||
div![
|
||||
C![
|
||||
"flex",
|
||||
"flex-nowrap",
|
||||
"w-auto",
|
||||
"flex-auto",
|
||||
"py-4",
|
||||
"border-b",
|
||||
"border-neutral-800"
|
||||
],
|
||||
let rows: Vec<_> = results
|
||||
.iter()
|
||||
.map(|r| {
|
||||
let tid = r.thread.clone();
|
||||
let check_tid = r.thread.clone();
|
||||
let datetime = human_age(r.timestamp as i64);
|
||||
let unread_idx = r.tags.iter().position(|e| e == &"unread");
|
||||
let mut tags = r.tags.clone();
|
||||
if let Some(idx) = unread_idx {
|
||||
tags.remove(idx);
|
||||
};
|
||||
let is_unread = unread_idx.is_some();
|
||||
let mut title_break = None;
|
||||
const TITLE_LENGTH_WRAP_LIMIT: usize = 40;
|
||||
for w in r.subject.split_whitespace() {
|
||||
if w.len() > TITLE_LENGTH_WRAP_LIMIT {
|
||||
title_break = Some(C!["break-all", "text-pretty"]);
|
||||
}
|
||||
}
|
||||
div![
|
||||
C!["flex", "items-center", "mr-4"],
|
||||
input![
|
||||
C![&tw_classes::CHECKBOX],
|
||||
attrs! {
|
||||
At::Type=>"checkbox",
|
||||
At::Checked=>selected_threads.contains(&tid).as_at_value(),
|
||||
}
|
||||
C![
|
||||
"flex",
|
||||
"flex-nowrap",
|
||||
"w-auto",
|
||||
"flex-auto",
|
||||
"py-4",
|
||||
"border-b",
|
||||
"border-neutral-800"
|
||||
],
|
||||
ev(Ev::Input, move |e| {
|
||||
if let Some(input) = e
|
||||
.target()
|
||||
.as_ref()
|
||||
.expect("failed to get reference to target")
|
||||
.dyn_ref::<web_sys::HtmlInputElement>()
|
||||
{
|
||||
if input.checked() {
|
||||
Msg::SelectionAddThread(check_tid)
|
||||
} else {
|
||||
Msg::SelectionRemoveThread(check_tid)
|
||||
}
|
||||
} else {
|
||||
Msg::Noop
|
||||
}
|
||||
}),
|
||||
],
|
||||
a![
|
||||
C!["flex-grow"],
|
||||
IF!(is_unread => C!["font-bold"]),
|
||||
attrs! {
|
||||
At::Href => urls::thread(&tid)
|
||||
},
|
||||
div![&r.subject],
|
||||
span![C!["text-xs"], pretty_authors(&r.authors)],
|
||||
div![
|
||||
C!["flex", "flex-wrap", "justify-between"],
|
||||
span![tags_chiclet(&tags)],
|
||||
span![C!["text-sm"], datetime]
|
||||
C!["flex", "items-center", "mr-4"],
|
||||
input![
|
||||
C![&tw_classes::CHECKBOX],
|
||||
attrs! {
|
||||
At::Type=>"checkbox",
|
||||
At::Checked=>selected_threads.contains(&tid).as_at_value(),
|
||||
}
|
||||
],
|
||||
ev(Ev::Input, move |e| {
|
||||
if let Some(input) = e
|
||||
.target()
|
||||
.as_ref()
|
||||
.expect("failed to get reference to target")
|
||||
.dyn_ref::<web_sys::HtmlInputElement>()
|
||||
{
|
||||
if input.checked() {
|
||||
Msg::SelectionAddThread(check_tid)
|
||||
} else {
|
||||
Msg::SelectionRemoveThread(check_tid)
|
||||
}
|
||||
} else {
|
||||
Msg::Noop
|
||||
}
|
||||
}),
|
||||
],
|
||||
a![
|
||||
C!["flex-grow"],
|
||||
IF!(is_unread => C!["font-bold"]),
|
||||
attrs! {
|
||||
At::Href => urls::thread(&tid)
|
||||
},
|
||||
div![C!["line-clamp-2"], title_break, &r.subject],
|
||||
span![C!["line-clamp-2", "text-xs"], pretty_authors(&r.authors)],
|
||||
div![
|
||||
C!["flex", "flex-wrap", "justify-between"],
|
||||
span![tags_chiclet(&tags)],
|
||||
span![C!["text-sm"], datetime]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
});
|
||||
})
|
||||
.collect();
|
||||
let show_bulk_edit = !selected_threads.is_empty();
|
||||
let all_selected = selected_threads.len() == results.len();
|
||||
let all_selected = (selected_threads.len() == results.len()) && !rows.is_empty();
|
||||
let content = if rows.is_empty() {
|
||||
let caught_up = query.contains("is:unread");
|
||||
let read_emoji = ["👻", "👽", "👾", "🤖", "💀"];
|
||||
let no_results_emoji = ["🙈", "👀", "🤦", "🤷", "🙅", "🛟", "🍩", "🌑", "💿", "🔍"];
|
||||
// Randomly choose emoji based on what 10-second window we're currently in
|
||||
let now = seed::window()
|
||||
.performance()
|
||||
.map(|p| p.now() as usize / 10_000)
|
||||
.unwrap_or(0);
|
||||
let (emoji, text) = if caught_up {
|
||||
let idx = now % read_emoji.len();
|
||||
(read_emoji[idx], "All caught up!")
|
||||
} else {
|
||||
let idx = now % no_results_emoji.len();
|
||||
(no_results_emoji[idx], "No results")
|
||||
};
|
||||
div![
|
||||
C!["text-center"],
|
||||
h1![C!["text-9xl"], emoji],
|
||||
p![C!["mt-8", "text-3xl", "font-semibold"], text]
|
||||
]
|
||||
} else {
|
||||
div![rows]
|
||||
};
|
||||
div![
|
||||
C!["flex", "flex-col", "flex-auto", "p-4"],
|
||||
search_toolbar(count, pager, show_bulk_edit, all_selected),
|
||||
div![rows],
|
||||
content,
|
||||
search_toolbar(count, pager, show_bulk_edit, all_selected),
|
||||
]
|
||||
}
|
||||
@@ -461,38 +522,42 @@ fn search_toolbar(
|
||||
if let Some(tri) = tri.get() {
|
||||
tri.set_indeterminate(indeterminate);
|
||||
}
|
||||
let catchup = div![button![
|
||||
tw_classes::button(),
|
||||
attrs! {At::Title => "Catch up"},
|
||||
span![i![C!["far", "fa-eye"]]],
|
||||
span![C!["pl-2", "hidden", "md:inline"], "Catch-up"],
|
||||
ev(Ev::Click, |_| Msg::CatchupStart)
|
||||
]];
|
||||
let tristate_input = div![
|
||||
C!["flex", "items-center", "mr-4"],
|
||||
input![
|
||||
&tri,
|
||||
C![&tw_classes::CHECKBOX],
|
||||
attrs! {
|
||||
At::Type=>"checkbox",
|
||||
},
|
||||
IF!(all_selected=>attrs!{At::Checked=>true})
|
||||
],
|
||||
ev(Ev::Input, move |_| {
|
||||
if all_selected {
|
||||
Msg::SelectionSetNone
|
||||
} else {
|
||||
Msg::SelectionSetAll
|
||||
}
|
||||
}),
|
||||
];
|
||||
nav![
|
||||
C!["py-4", "flex", "w-full", "justify-between"],
|
||||
div![
|
||||
C!["gap-2", "flex", IF!(show_bulk_edit => "hidden")],
|
||||
div![button![
|
||||
tw_classes::button(),
|
||||
attrs! {At::Title => "Mark as read"},
|
||||
span![i![C!["far", "fa-eye"]]],
|
||||
span![C!["pl-2", "hidden", "md:inline"], "Catch-up"],
|
||||
ev(Ev::Click, |_| Msg::CatchupStart)
|
||||
]],
|
||||
&tristate_input,
|
||||
&catchup
|
||||
],
|
||||
div![
|
||||
C!["gap-2", "flex", IF!(!show_bulk_edit => "hidden")],
|
||||
div![
|
||||
C!["flex", "items-center", "mr-4"],
|
||||
input![
|
||||
tri,
|
||||
C![&tw_classes::CHECKBOX],
|
||||
attrs! {
|
||||
At::Type=>"checkbox",
|
||||
At::Checked=>all_selected,
|
||||
}
|
||||
],
|
||||
ev(Ev::Input, move |_| {
|
||||
if all_selected {
|
||||
Msg::SelectionSetNone
|
||||
} else {
|
||||
Msg::SelectionSetAll
|
||||
}
|
||||
}),
|
||||
],
|
||||
&tristate_input,
|
||||
&catchup,
|
||||
div![
|
||||
button![
|
||||
tw_classes::button(),
|
||||
@@ -530,13 +595,19 @@ fn search_toolbar(
|
||||
tw_classes::button(),
|
||||
IF!(!pager.has_previous_page => attrs!{ At::Disabled=>true }),
|
||||
"<",
|
||||
IF!(pager.has_previous_page => ev(Ev::Click, |_| Msg::PreviousPage)),
|
||||
IF!(pager.has_previous_page => ev(
|
||||
Ev::Click, |_| Msg::MultiMsg(vec![
|
||||
Msg::ScrollToTop,
|
||||
Msg::PreviousPage]))),
|
||||
],
|
||||
button![
|
||||
tw_classes::button(),
|
||||
IF!(!pager.has_next_page => attrs!{ At::Disabled=>true }),
|
||||
">",
|
||||
IF!(pager.has_next_page => ev(Ev::Click, |_| Msg::NextPage))
|
||||
IF!(pager.has_next_page => ev(
|
||||
Ev::Click, |_| Msg::MultiMsg(vec![
|
||||
Msg::ScrollToTop,
|
||||
Msg::NextPage])))
|
||||
]
|
||||
]
|
||||
]
|
||||
@@ -677,19 +748,25 @@ fn render_open_header(msg: &ShowThreadQueryThreadOnEmailThreadMessages) -> Node<
|
||||
.collect();
|
||||
let show_x_original_to = !*to_xinu.borrow() && msg.x_original_to.is_some();
|
||||
let show_delivered_to = !*to_xinu.borrow() && !show_x_original_to && msg.delivered_to.is_some();
|
||||
let host = seed::window().location().host().expect("couldn't get host");
|
||||
let href = letterbox_shared::urls::view_original(Some(&host), &msg.id);
|
||||
div![
|
||||
C!["flex", "p-4", "bg-neutral-800"],
|
||||
div![avatar],
|
||||
div![
|
||||
C!["px-4", "mr-auto"],
|
||||
span![
|
||||
C!["font-semibold", "text-sm"],
|
||||
from_detail.as_ref().map(|addr| attrs! {
|
||||
At::Title => addr
|
||||
}),
|
||||
&from,
|
||||
" ",
|
||||
from_detail.as_ref().map(|text| copy_text_widget(&text))
|
||||
C!["px-4", "flex-1"],
|
||||
div![
|
||||
C!["flex"],
|
||||
div![
|
||||
C!["font-semibold", "text-sm", "flex-1"],
|
||||
from_detail.as_ref().map(|addr| attrs! {
|
||||
At::Title => addr
|
||||
}),
|
||||
&from,
|
||||
" ",
|
||||
from_detail.as_ref().map(|text| copy_text_widget(&text))
|
||||
],
|
||||
snooze_buttons(msg.timestamp, &id),
|
||||
],
|
||||
IF!(!msg.to.is_empty() =>div![
|
||||
C!["text-xs"],
|
||||
@@ -758,20 +835,36 @@ fn render_open_header(msg: &ShowThreadQueryThreadOnEmailThreadMessages) -> Node<
|
||||
C!["text-right"],
|
||||
msg.timestamp
|
||||
.map(|ts| div![C!["text-xs", "text-nowrap"], human_age(ts)]),
|
||||
i![C![
|
||||
"mx-4",
|
||||
"read-status",
|
||||
"far",
|
||||
if is_unread {
|
||||
"fa-envelope"
|
||||
} else {
|
||||
"fa-envelope-open"
|
||||
},
|
||||
]],
|
||||
ev(Ev::Click, move |e| {
|
||||
e.stop_propagation();
|
||||
Msg::SetUnread(id, !is_unread)
|
||||
}),
|
||||
div![
|
||||
C!["p-2"],
|
||||
i![C![
|
||||
"mx-4",
|
||||
"read-status",
|
||||
"far",
|
||||
if is_unread {
|
||||
"fa-envelope"
|
||||
} else {
|
||||
"fa-envelope-open"
|
||||
},
|
||||
]],
|
||||
ev(Ev::Click, move |e| {
|
||||
e.stop_propagation();
|
||||
Msg::SetUnread(id, !is_unread)
|
||||
}),
|
||||
],
|
||||
div![
|
||||
C!["text-xs"],
|
||||
span![a![
|
||||
attrs! {
|
||||
At::Href=>href,
|
||||
At::Target=>"_blank",
|
||||
},
|
||||
"View original",
|
||||
ev(Ev::Click, move |e| {
|
||||
e.stop_propagation();
|
||||
})
|
||||
]]
|
||||
]
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -839,13 +932,22 @@ fn render_closed_header(msg: &ShowThreadQueryThreadOnEmailThreadMessages) -> Nod
|
||||
.collect();
|
||||
let show_x_original_to = !*to_xinu.borrow() && msg.x_original_to.is_some();
|
||||
let show_delivered_to = !*to_xinu.borrow() && !show_x_original_to && msg.delivered_to.is_some();
|
||||
let common_style = C!["text-sm", "pr-2", "text-gray-500"];
|
||||
div![
|
||||
C!["flex", "p-4", "bg-neutral-800"],
|
||||
div![avatar],
|
||||
C!["flex", "bg-neutral-800"],
|
||||
div![C!["self-center"], avatar],
|
||||
div![
|
||||
C!["px-4", "mr-auto"],
|
||||
span![
|
||||
C!["font-semibold", "text-sm"],
|
||||
C![
|
||||
"mx-2",
|
||||
"flex-1",
|
||||
"flex",
|
||||
"flex-nowrap",
|
||||
"items-center",
|
||||
"truncate",
|
||||
],
|
||||
div![
|
||||
C!["font-semibold", "text-white"],
|
||||
&common_style,
|
||||
from_detail.as_ref().map(|addr| attrs! {
|
||||
At::Title => addr
|
||||
}),
|
||||
@@ -853,7 +955,7 @@ fn render_closed_header(msg: &ShowThreadQueryThreadOnEmailThreadMessages) -> Nod
|
||||
],
|
||||
" ",
|
||||
IF!(!msg.to.is_empty() => div![
|
||||
C!["text-xs"],
|
||||
&common_style,
|
||||
span![
|
||||
C!["font-semibold"],
|
||||
"To: "
|
||||
@@ -864,7 +966,7 @@ fn render_closed_header(msg: &ShowThreadQueryThreadOnEmailThreadMessages) -> Nod
|
||||
" "
|
||||
]),
|
||||
IF!(!msg.cc.is_empty() => div![
|
||||
C!["text-xs", "max-w-full", "overflow-clip", "text-ellipsis"],
|
||||
&common_style,
|
||||
span![
|
||||
C!["font-semibold"],
|
||||
"CC: "
|
||||
@@ -872,7 +974,7 @@ fn render_closed_header(msg: &ShowThreadQueryThreadOnEmailThreadMessages) -> Nod
|
||||
cc_addrs
|
||||
]),
|
||||
IF!(show_x_original_to => div![
|
||||
C!["text-xs"],
|
||||
&common_style,
|
||||
span![
|
||||
C!["font-semibold"],
|
||||
"Original To: "
|
||||
@@ -891,7 +993,7 @@ fn render_closed_header(msg: &ShowThreadQueryThreadOnEmailThreadMessages) -> Nod
|
||||
]
|
||||
]),
|
||||
IF!(show_delivered_to => div![
|
||||
C!["text-xs"],
|
||||
&common_style,
|
||||
span![
|
||||
C!["font-semibold"],
|
||||
"Delivered To: "
|
||||
@@ -910,12 +1012,13 @@ fn render_closed_header(msg: &ShowThreadQueryThreadOnEmailThreadMessages) -> Nod
|
||||
]
|
||||
]),
|
||||
],
|
||||
span![
|
||||
C!["text-right"],
|
||||
msg.timestamp
|
||||
.map(|ts| div![C!["text-xs", "text-nowrap"], human_age(ts)]),
|
||||
msg.timestamp.map(|ts| div![
|
||||
C!["text-xs", "text-nowrap", "justify-self-end", "self-center"],
|
||||
human_age(ts)
|
||||
]),
|
||||
div![
|
||||
i![C![
|
||||
"mx-4",
|
||||
"m-2",
|
||||
"read-status",
|
||||
"far",
|
||||
if is_unread {
|
||||
@@ -927,15 +1030,22 @@ fn render_closed_header(msg: &ShowThreadQueryThreadOnEmailThreadMessages) -> Nod
|
||||
ev(Ev::Click, move |e| {
|
||||
e.stop_propagation();
|
||||
Msg::SetUnread(id, !is_unread)
|
||||
}),
|
||||
})
|
||||
]
|
||||
]
|
||||
}
|
||||
|
||||
fn message_render(msg: &ShowThreadQueryThreadOnEmailThreadMessages, open: bool) -> Node<Msg> {
|
||||
let expand_id = msg.id.clone();
|
||||
let from = match &msg.from {
|
||||
Some(ShowThreadQueryThreadOnEmailThreadMessagesFrom {
|
||||
addr: Some(addr), ..
|
||||
}) => Some(addr.to_string()),
|
||||
_ => None,
|
||||
};
|
||||
let from = from.map(|f| f.replace('.', "-").replace('@', "-"));
|
||||
div![
|
||||
C!["lg:mb-4"],
|
||||
C!["pb-1"],
|
||||
div![
|
||||
if open {
|
||||
render_open_header(&msg)
|
||||
@@ -953,7 +1063,7 @@ fn message_render(msg: &ShowThreadQueryThreadOnEmailThreadMessages, open: bool)
|
||||
],
|
||||
IF!(open =>
|
||||
div![
|
||||
C!["bg-white", "text-black", "p-4", "min-w-full", "w-0","overflow-x-auto"],
|
||||
C!["content", "bg-white", "text-black", "p-4", "min-w-full", "w-0","overflow-x-auto", from.map(|f|format!("from-{f}"))],
|
||||
match &msg.body {
|
||||
ShowThreadQueryThreadOnEmailThreadMessagesBody::UnhandledContentType(
|
||||
ShowThreadQueryThreadOnEmailThreadMessagesBodyOnUnhandledContentType { contents ,content_tree},
|
||||
@@ -979,6 +1089,8 @@ fn message_render(msg: &ShowThreadQueryThreadOnEmailThreadMessages, open: bool)
|
||||
},
|
||||
) => div![
|
||||
C!["view-part-text-html"],
|
||||
// If there isn't any HTML tags, treat more like plain text
|
||||
IF!(!(contents.contains('<') && contents.contains('>')) => C!["whitespace-pre-line"]),
|
||||
raw![contents],
|
||||
IF!(!msg.attachments.is_empty() => render_attachements(&msg.attachments)),
|
||||
view_content_tree(&content_tree),
|
||||
@@ -1057,13 +1169,13 @@ fn render_attachements(
|
||||
]
|
||||
}
|
||||
|
||||
// TODO: add cathup_mode:bool and hide elements when true
|
||||
#[topo::nested]
|
||||
fn thread(
|
||||
thread: &ShowThreadQueryThreadOnEmailThread,
|
||||
open_messages: &HashSet<String>,
|
||||
content_el: &ElRef<HtmlElement>,
|
||||
catchup_mode: bool,
|
||||
read_completion_ratio: f64,
|
||||
) -> Node<Msg> {
|
||||
// TODO(wathiede): show per-message subject if it changes significantly from top-level subject
|
||||
let subject = if thread.subject.is_empty() {
|
||||
@@ -1090,11 +1202,18 @@ fn thread(
|
||||
let unread_thread_id = thread.thread_id.clone();
|
||||
let spam_add_thread_id = thread.thread_id.clone();
|
||||
let spam_unread_thread_id = thread.thread_id.clone();
|
||||
let mut title_break = None;
|
||||
const TITLE_LENGTH_WRAP_LIMIT: usize = 40;
|
||||
for w in subject.split_whitespace() {
|
||||
if w.len() > TITLE_LENGTH_WRAP_LIMIT {
|
||||
title_break = Some(C!["break-all", "text-pretty"]);
|
||||
}
|
||||
}
|
||||
div![
|
||||
C!["lg:p-4", "max-w-4xl"],
|
||||
div![
|
||||
C!["p-4", "lg:p-0"],
|
||||
h3![C!["text-xl"], subject],
|
||||
h3![C!["text-xl"], title_break, subject],
|
||||
span![removable_tags_chiclet(&thread.thread_id, &tags)],
|
||||
IF!(!catchup_mode => div![
|
||||
C!["pt-4", "gap-2", "flex", "justify-around"],
|
||||
@@ -1142,12 +1261,7 @@ fn thread(
|
||||
messages,
|
||||
IF!(!catchup_mode => click_to_top())
|
||||
],
|
||||
/* TODO(wathiede): plumb in orignal id
|
||||
a![
|
||||
attrs! {At::Href=>api::original(&thread_node.0.as_ref().expect("message missing").id)},
|
||||
"Original"
|
||||
],
|
||||
*/
|
||||
reading_progress(read_completion_ratio)
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1185,49 +1299,75 @@ fn view_header(
|
||||
false
|
||||
};
|
||||
let query = Url::decode_uri_component(query).unwrap_or("".to_string());
|
||||
let filter_all = String::new();
|
||||
let filter_unread = unread_query().to_string();
|
||||
let filter_news = "is:unread is:news".to_string();
|
||||
let filter_mail = "is:unread is:mail".to_string();
|
||||
let highlight_color = "bg-sky-800";
|
||||
|
||||
nav![
|
||||
C!["flex", "px-4", "pt-4", "overflow-hidden"],
|
||||
a![
|
||||
C![IF![is_error => "bg-red-500"], "rounded-r-none"],
|
||||
tw_classes::button(),
|
||||
span![i![C![
|
||||
"fa-solid",
|
||||
"fa-arrow-rotate-right",
|
||||
IF![is_loading => "animate-spin"],
|
||||
]]],
|
||||
ev(Ev::Click, |_| Msg::RefreshStart),
|
||||
C!["flex", "flex-col"],
|
||||
div![
|
||||
C!["flex-auto", "flex"],
|
||||
button![
|
||||
C![IF!(is_error => "bg-red-500"), "rounded-none"],
|
||||
tw_classes::button(),
|
||||
span![i![C![
|
||||
"fa-solid",
|
||||
"fa-arrow-rotate-right",
|
||||
IF![is_loading => "animate-spin"],
|
||||
]]],
|
||||
ev(Ev::Click, |_| Msg::RefreshStart),
|
||||
],
|
||||
button![
|
||||
IF!(query == filter_all => C![highlight_color]),
|
||||
tw_classes::button(),
|
||||
C!["grow", "rounded-none"],
|
||||
"All",
|
||||
ev(Ev::Click, |_| Msg::SearchQuery(filter_all)),
|
||||
],
|
||||
button![
|
||||
IF!(query == filter_unread => C![highlight_color]),
|
||||
tw_classes::button(),
|
||||
C!["grow", "rounded-none"],
|
||||
span![i![C!["far", "fa-envelope"]]],
|
||||
" Unread",
|
||||
ev(Ev::Click, |_| Msg::SearchQuery(filter_unread)),
|
||||
],
|
||||
button![
|
||||
IF!(query == filter_news => C![highlight_color]),
|
||||
tw_classes::button(),
|
||||
C!["grow", "rounded-none"],
|
||||
span![i![C!["far", "fa-envelope"]]],
|
||||
" News",
|
||||
ev(Ev::Click, |_| Msg::SearchQuery(filter_news)),
|
||||
],
|
||||
button![
|
||||
IF!(query == filter_mail => C![highlight_color]),
|
||||
tw_classes::button(),
|
||||
C!["grow", "rounded-none"],
|
||||
span![i![C!["far", "fa-envelope"]]],
|
||||
" Mail",
|
||||
ev(Ev::Click, |_| Msg::SearchQuery(filter_mail)),
|
||||
],
|
||||
],
|
||||
a![
|
||||
tw_classes::button(),
|
||||
C!["px-4", "rounded-none"],
|
||||
attrs! {
|
||||
At::Href => urls::search(unread_query(), 0)
|
||||
},
|
||||
"Unread",
|
||||
],
|
||||
a![
|
||||
tw_classes::button(),
|
||||
C!["px-4", "rounded-none"],
|
||||
attrs! {
|
||||
At::Href => urls::search("", 0)
|
||||
},
|
||||
"All",
|
||||
],
|
||||
input![
|
||||
C!["grow", "pl-2", "text-black", "rounded-r"],
|
||||
attrs! {
|
||||
At::Placeholder => "Search";
|
||||
At::AutoFocus => auto_focus_search.as_at_value();
|
||||
At::Value => query,
|
||||
},
|
||||
input_ev(Ev::Input, |q| Msg::UpdateQuery(q)),
|
||||
// Send search on enter.
|
||||
keyboard_ev(Ev::KeyUp, move |e| if e.key_code() == 0x0d {
|
||||
Msg::SearchQuery(query)
|
||||
} else {
|
||||
Msg::Noop
|
||||
}),
|
||||
div![
|
||||
C!["flex-auto", "flex"],
|
||||
input![
|
||||
C!["grow", "text-black", "p-2", "focus-visible:outline-0"],
|
||||
attrs! {
|
||||
At::Placeholder => "Search";
|
||||
At::AutoFocus => auto_focus_search.as_at_value();
|
||||
At::Value => query,
|
||||
},
|
||||
input_ev(Ev::Input, |q| Msg::UpdateQuery(q)),
|
||||
// Send search on enter.
|
||||
keyboard_ev(Ev::KeyUp, move |e| if e.key_code() == 0x0d {
|
||||
Msg::SearchQuery(query)
|
||||
} else {
|
||||
Msg::Noop
|
||||
}),
|
||||
]
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -1264,7 +1404,7 @@ pub fn view_tags(tags: &Option<Vec<Tag>>) -> Node<Msg> {
|
||||
},
|
||||
],
|
||||
a![
|
||||
C!["grow", "truncate"],
|
||||
C![indent_cls, "grow", "truncate"],
|
||||
attrs! {
|
||||
At::Href => href
|
||||
},
|
||||
@@ -1365,6 +1505,7 @@ fn news_post(
|
||||
post: &ShowThreadQueryThreadOnNewsPost,
|
||||
content_el: &ElRef<HtmlElement>,
|
||||
catchup_mode: bool,
|
||||
read_completion_ratio: f64,
|
||||
) -> Node<Msg> {
|
||||
let subject = &post.title;
|
||||
set_title(subject);
|
||||
@@ -1390,11 +1531,18 @@ fn news_post(
|
||||
]
|
||||
}
|
||||
|
||||
let mut title_break = None;
|
||||
const TITLE_LENGTH_WRAP_LIMIT: usize = 40;
|
||||
for w in subject.split_whitespace() {
|
||||
if w.len() > TITLE_LENGTH_WRAP_LIMIT {
|
||||
title_break = Some(C!["break-all", "text-pretty"]);
|
||||
}
|
||||
}
|
||||
div![
|
||||
C!["lg:p-4", "max-w-4xl"],
|
||||
div![
|
||||
C!["p-4", "lg:p-0"],
|
||||
h3![C!["text-xl"], subject],
|
||||
h3![C!["text-xl"], title_break, subject],
|
||||
span![tag(format!("News/{}", post.slug))],
|
||||
IF!(!catchup_mode => div![
|
||||
C!["pt-4", "gap-2", "flex", "justify-around"],
|
||||
@@ -1445,6 +1593,7 @@ fn news_post(
|
||||
]
|
||||
],
|
||||
IF!(!catchup_mode => click_to_top()),
|
||||
reading_progress(read_completion_ratio)
|
||||
]
|
||||
}
|
||||
fn render_news_post_header(post: &ShowThreadQueryThreadOnNewsPost) -> Node<Msg> {
|
||||
@@ -1480,9 +1629,13 @@ fn render_news_post_header(post: &ShowThreadQueryThreadOnNewsPost) -> Node<Msg>
|
||||
C!["flex", "p-4", "bg-neutral-800"],
|
||||
div![favicon],
|
||||
div![
|
||||
C!["px-4", "mr-auto"],
|
||||
C!["px-4", "mr-auto", "flex-1"],
|
||||
div![
|
||||
div![C!["font-semibold", "text-sm"], from],
|
||||
div![
|
||||
C!["flex"],
|
||||
div![C!["font-semibold", "text-sm", "flex-1"], from],
|
||||
snooze_buttons(Some(post.timestamp), &id),
|
||||
],
|
||||
div![
|
||||
C!["flex", "gap-2", "pt-2", "text-sm"],
|
||||
a![
|
||||
@@ -1527,12 +1680,12 @@ fn render_news_post_header(post: &ShowThreadQueryThreadOnNewsPost) -> Node<Msg>
|
||||
} else {
|
||||
"fa-envelope-open"
|
||||
},
|
||||
]]
|
||||
],
|
||||
ev(Ev::Click, move |e| {
|
||||
e.stop_propagation();
|
||||
Msg::SetUnread(id, !is_unread)
|
||||
})
|
||||
]],
|
||||
ev(Ev::Click, move |e| {
|
||||
e.stop_propagation();
|
||||
Msg::SetUnread(id, !is_unread)
|
||||
})
|
||||
]
|
||||
]
|
||||
}
|
||||
fn reading_progress(ratio: f64) -> Node<Msg> {
|
||||
@@ -1577,3 +1730,47 @@ fn click_to_top() -> Node<Msg> {
|
||||
ev(Ev::Click, |_| Msg::ScrollToTop)
|
||||
]
|
||||
}
|
||||
|
||||
fn snooze_buttons(timestamp: Option<i64>, id: &str) -> Node<Msg> {
|
||||
div![
|
||||
span![C!["px-2"], "⏰"],
|
||||
button![
|
||||
tw_classes::button(),
|
||||
C!["rounded-r-none"],
|
||||
"1d",
|
||||
ev(Ev::Click, {
|
||||
let id = id.to_string();
|
||||
move |e| {
|
||||
e.stop_propagation();
|
||||
Msg::Snooze(id, Utc::now() + chrono::Days::new(1))
|
||||
}
|
||||
})
|
||||
],
|
||||
button![
|
||||
tw_classes::button(),
|
||||
C!["rounded-none"],
|
||||
"7d",
|
||||
ev(Ev::Click, {
|
||||
let id = id.to_string();
|
||||
move |e| {
|
||||
e.stop_propagation();
|
||||
Msg::Snooze(id, Utc::now() + chrono::Days::new(7))
|
||||
}
|
||||
})
|
||||
],
|
||||
timestamp.map(
|
||||
|ts| chrono::DateTime::from_timestamp(ts, 0).map(|ts| button![
|
||||
tw_classes::button(),
|
||||
C!["rounded-l-none"],
|
||||
"+6m",
|
||||
ev(Ev::Click, {
|
||||
let id = id.to_string();
|
||||
move |e| {
|
||||
e.stop_propagation();
|
||||
Msg::Snooze(id, ts + chrono::Days::new(180))
|
||||
}
|
||||
})
|
||||
])
|
||||
),
|
||||
]
|
||||
}
|
||||
|
||||
213
web/src/websocket.rs
Normal file
213
web/src/websocket.rs
Normal file
@@ -0,0 +1,213 @@
|
||||
use std::{collections::VecDeque, rc::Rc};
|
||||
|
||||
use letterbox_shared::WebsocketMessage;
|
||||
use log::{debug, error};
|
||||
use seed::prelude::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
#[allow(dead_code)]
|
||||
mod wasm_sockets {
|
||||
use std::{cell::RefCell, rc::Rc};
|
||||
|
||||
use thiserror::Error;
|
||||
use web_sys::{CloseEvent, ErrorEvent};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct JsValue;
|
||||
#[derive(Debug)]
|
||||
pub enum ConnectionStatus {
|
||||
/// Connecting to a server
|
||||
Connecting,
|
||||
/// Connected to a server
|
||||
Connected,
|
||||
/// Disconnected from a server due to an error
|
||||
Error,
|
||||
/// Disconnected from a server without an error
|
||||
Disconnected,
|
||||
}
|
||||
#[derive(Debug)]
|
||||
pub struct EventClient {
|
||||
pub status: Rc<RefCell<ConnectionStatus>>,
|
||||
}
|
||||
impl EventClient {
|
||||
pub fn new(_: &str) -> Result<Self, WebSocketError> {
|
||||
todo!("this is a mock")
|
||||
}
|
||||
pub fn send_string(&self, _essage: &str) -> Result<(), JsValue> {
|
||||
todo!("this is a mock")
|
||||
}
|
||||
pub fn set_on_error(&mut self, _: Option<Box<dyn Fn(ErrorEvent)>>) {
|
||||
todo!("this is a mock")
|
||||
}
|
||||
pub fn set_on_connection(&mut self, _: Option<Box<dyn Fn(&EventClient)>>) {
|
||||
todo!("this is a mock")
|
||||
}
|
||||
pub fn set_on_close(&mut self, _: Option<Box<dyn Fn(CloseEvent)>>) {
|
||||
todo!("this is a mock")
|
||||
}
|
||||
pub fn set_on_message(&mut self, _: Option<Box<dyn Fn(&EventClient, Message)>>) {
|
||||
todo!("this is a mock")
|
||||
}
|
||||
}
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum Message {
|
||||
Text(String),
|
||||
Binary(Vec<u8>),
|
||||
}
|
||||
#[derive(Debug, Clone, Error)]
|
||||
pub enum WebSocketError {}
|
||||
}
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
use wasm_sockets::{ConnectionStatus, EventClient, Message, WebSocketError};
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
use wasm_sockets::{ConnectionStatus, EventClient, Message, WebSocketError};
|
||||
use web_sys::CloseEvent;
|
||||
|
||||
/// Message from the client to the server.
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct ClientMessage {
|
||||
pub text: String,
|
||||
}
|
||||
|
||||
//const WS_URL: &str = "wss://9000.z.xinu.tv/api/ws";
|
||||
//const WS_URL: &str = "wss://9345.z.xinu.tv/api/graphql/ws";
|
||||
//const WS_URL: &str = "wss://6758.z.xinu.tv/api/ws";
|
||||
|
||||
// ------ ------
|
||||
// Model
|
||||
// ------ ------
|
||||
|
||||
pub struct Model {
|
||||
ws_url: String,
|
||||
web_socket: EventClient,
|
||||
web_socket_reconnector: Option<StreamHandle>,
|
||||
pub updates: VecDeque<WebsocketMessage>,
|
||||
}
|
||||
|
||||
// ------ ------
|
||||
// Init
|
||||
// ------ ------
|
||||
|
||||
pub fn init(ws_url: &str, orders: &mut impl Orders<Msg>) -> Model {
|
||||
Model {
|
||||
ws_url: ws_url.to_string(),
|
||||
web_socket: create_websocket(ws_url, orders).unwrap(),
|
||||
web_socket_reconnector: None,
|
||||
updates: VecDeque::new(),
|
||||
}
|
||||
}
|
||||
|
||||
// ------ ------
|
||||
// Update
|
||||
// ------ ------
|
||||
|
||||
pub enum Msg {
|
||||
WebSocketOpened,
|
||||
TextMessageReceived(WebsocketMessage),
|
||||
WebSocketClosed(CloseEvent),
|
||||
WebSocketFailed,
|
||||
ReconnectWebSocket(usize),
|
||||
#[allow(dead_code)]
|
||||
SendMessage(ClientMessage),
|
||||
}
|
||||
|
||||
pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
|
||||
match msg {
|
||||
Msg::WebSocketOpened => {
|
||||
model.web_socket_reconnector = None;
|
||||
debug!("WebSocket connection is open now");
|
||||
}
|
||||
Msg::TextMessageReceived(msg) => {
|
||||
model.updates.push_back(msg);
|
||||
}
|
||||
Msg::WebSocketClosed(close_event) => {
|
||||
debug!(
|
||||
r#"==================
|
||||
WebSocket connection was closed:
|
||||
Clean: {0}
|
||||
Code: {1}
|
||||
Reason: {2}
|
||||
=================="#,
|
||||
close_event.was_clean(),
|
||||
close_event.code(),
|
||||
close_event.reason()
|
||||
);
|
||||
|
||||
// Chrome doesn't invoke `on_error` when the connection is lost.
|
||||
if !close_event.was_clean() && model.web_socket_reconnector.is_none() {
|
||||
model.web_socket_reconnector = Some(
|
||||
orders.stream_with_handle(streams::backoff(None, Msg::ReconnectWebSocket)),
|
||||
);
|
||||
}
|
||||
}
|
||||
Msg::WebSocketFailed => {
|
||||
debug!("WebSocket failed");
|
||||
if model.web_socket_reconnector.is_none() {
|
||||
model.web_socket_reconnector = Some(
|
||||
orders.stream_with_handle(streams::backoff(None, Msg::ReconnectWebSocket)),
|
||||
);
|
||||
}
|
||||
}
|
||||
Msg::ReconnectWebSocket(retries) => {
|
||||
debug!("Reconnect attempt: {}", retries);
|
||||
model.web_socket = create_websocket(&model.ws_url, orders).unwrap();
|
||||
}
|
||||
Msg::SendMessage(msg) => {
|
||||
let txt = serde_json::to_string(&msg).unwrap();
|
||||
model.web_socket.send_string(&txt).unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn create_websocket(url: &str, orders: &impl Orders<Msg>) -> Result<EventClient, WebSocketError> {
|
||||
let msg_sender = orders.msg_sender();
|
||||
|
||||
let mut client = EventClient::new(url)?;
|
||||
|
||||
client.set_on_error(Some(Box::new(|error| {
|
||||
gloo_console::error!("WS: ", error);
|
||||
})));
|
||||
|
||||
let send = msg_sender.clone();
|
||||
client.set_on_connection(Some(Box::new(move |client: &EventClient| {
|
||||
debug!("{:#?}", client.status);
|
||||
let msg = match *client.status.borrow() {
|
||||
ConnectionStatus::Connecting => {
|
||||
debug!("Connecting...");
|
||||
None
|
||||
}
|
||||
ConnectionStatus::Connected => Some(Msg::WebSocketOpened),
|
||||
ConnectionStatus::Error => Some(Msg::WebSocketFailed),
|
||||
ConnectionStatus::Disconnected => {
|
||||
debug!("Disconnected");
|
||||
None
|
||||
}
|
||||
};
|
||||
send(msg);
|
||||
})));
|
||||
|
||||
let send = msg_sender.clone();
|
||||
client.set_on_close(Some(Box::new(move |ev| {
|
||||
debug!("WS: Connection closed");
|
||||
send(Some(Msg::WebSocketClosed(ev)));
|
||||
})));
|
||||
|
||||
let send = msg_sender.clone();
|
||||
client.set_on_message(Some(Box::new(move |_: &EventClient, msg: Message| {
|
||||
decode_message(msg, Rc::clone(&send))
|
||||
})));
|
||||
|
||||
Ok(client)
|
||||
}
|
||||
|
||||
fn decode_message(message: Message, msg_sender: Rc<dyn Fn(Option<Msg>)>) {
|
||||
match message {
|
||||
Message::Text(txt) => {
|
||||
let msg: WebsocketMessage = serde_json::from_str(&txt).unwrap_or_else(|e| {
|
||||
panic!("failed to parse json into WebsocketMessage: {e}\n'{txt}'")
|
||||
});
|
||||
msg_sender(Some(Msg::TextMessageReceived(msg)));
|
||||
}
|
||||
m => error!("unexpected message type received of {m:?}"),
|
||||
}
|
||||
}
|
||||
11
web/static/email-specific.css
Normal file
11
web/static/email-specific.css
Normal file
@@ -0,0 +1,11 @@
|
||||
.mail-thread .content.from-noreply-news-bloomberg-com a {
|
||||
background-color: initial !important;
|
||||
}
|
||||
|
||||
.mail-thread .content.from-noreply-news-bloomberg-com h2 {
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
.mail-thread .content.from-dmarcreport-microsoft-com div {
|
||||
font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
|
||||
}
|
||||
@@ -1,69 +1,80 @@
|
||||
html {
|
||||
background-color: black;
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
.mail-thread a,
|
||||
.mail-thread .content a,
|
||||
.news-post a {
|
||||
color: var(--color-link) !important;
|
||||
text-decoration: underline;
|
||||
color: var(--color-link) !important;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.mail-thread br,
|
||||
.mail-thread .content br,
|
||||
.news-post br {
|
||||
display: block;
|
||||
margin-top: 1em;
|
||||
content: " ";
|
||||
display: block;
|
||||
margin-top: 1em;
|
||||
content: " ";
|
||||
}
|
||||
|
||||
.mail-thread h1,
|
||||
.mail-thread h2,
|
||||
.mail-thread h3,
|
||||
.mail-thread h4,
|
||||
.mail-thread .content h1,
|
||||
.mail-thread .content h2,
|
||||
.mail-thread .content h3,
|
||||
.mail-thread .content h4,
|
||||
.news-post h1,
|
||||
.news-post h2,
|
||||
.news-post h3,
|
||||
.news-post h4 {
|
||||
margin-top: 1em !important;
|
||||
margin-bottom: 1em !important;
|
||||
margin-top: 1em !important;
|
||||
margin-bottom: 1em !important;
|
||||
}
|
||||
|
||||
.mail-thread p,
|
||||
.mail-thread .content p,
|
||||
.news-post p {
|
||||
margin-bottom: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.mail-thread pre,
|
||||
.mail-thread code,
|
||||
.news-post pre,
|
||||
.mail-thread .content pre,
|
||||
.news-post pre {
|
||||
font-family: monospace;
|
||||
background-color: #eee !important;
|
||||
padding: 0.5em;
|
||||
white-space: break-spaces;
|
||||
}
|
||||
|
||||
.mail-thread .content code,
|
||||
.news-post code {
|
||||
font-family: monospace;
|
||||
background-color: #eee !important;
|
||||
padding: 0.5em !important;
|
||||
font-family: monospace;
|
||||
white-space: break-spaces;
|
||||
background-color: #eee !important;
|
||||
}
|
||||
|
||||
.mail-thread blockquote {
|
||||
padding-left: 1em;
|
||||
border-left: 2px solid #ddd;
|
||||
.mail-thread .content blockquote {
|
||||
padding-left: 1em;
|
||||
border-left: 2px solid #ddd;
|
||||
}
|
||||
|
||||
.mail-thread ol,
|
||||
.mail-thread ul {
|
||||
margin-left: 2em;
|
||||
.mail-thread .content ol,
|
||||
.mail-thread .content ul {
|
||||
margin-left: 2em;
|
||||
}
|
||||
|
||||
/* Hackaday figures have unreadable black on dark grey */
|
||||
.news-post figcaption.wp-caption-text {
|
||||
background-color: initial !important;
|
||||
background-color: initial !important;
|
||||
}
|
||||
|
||||
.news-post.site-nautilus .article-ad,
|
||||
.news-post.site-nautilus .primis-ad {
|
||||
display: none !important;
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.news-post.site-seiya-me figure>pre,
|
||||
.news-post.site-seiya-me figure>pre>code {
|
||||
background-color: black !important;
|
||||
}
|
||||
|
||||
.news-post.site-slashdot .story-byline {
|
||||
display: block !important;
|
||||
height: initial !important;
|
||||
overflow: auto !important;
|
||||
position: static !important;
|
||||
}
|
||||
display: block !important;
|
||||
height: initial !important;
|
||||
overflow: auto !important;
|
||||
position: static !important;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user