Overview
Comment: | fix parsing a little... |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
03fe0265ac73dda6c8d166ee54afe637 |
User & Date: | arcade on 2024-05-22 15:11:57.371 |
Other Links: | manifest | tags |
Context
2024-05-22
| ||
19:09 | also parse Sender header check-in: 9c12e26fb6 user: arcade tags: trunk | |
15:11 | fix parsing a little... check-in: 03fe0265ac user: arcade tags: trunk | |
13:39 | mess with header/body formatting check-in: 667b874fdb user: arcade tags: trunk | |
Changes
Modified src/main.rs
from [1db19902b5]
to [2053558805].
︙ | |||
92 93 94 95 96 97 98 | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | - + | let mut reply: Vec<Cow<str>> = vec![]; if let Some(subject) = mail.subject() { reply.push(format!("**Subject:** `{}`", subject).into()); } else if let Some(thread) = mail.thread_name() { reply.push(format!("**Thread:** `{}`", thread).into()); } if let Some(from) = mail.from() { |
︙ | |||
129 130 131 132 133 134 135 | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | + - + + | let text = mail.body_text(0).unwrap(); if text.len() < 4096 - header_size { body = text; text_num = 1; } }; reply.push("```".into()); for line in body.lines() { |
︙ | |||
153 154 155 156 157 158 159 | 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | - | files_to_send.push(mail.attachment(file_num).unwrap()); file_num += 1; } for chat in rcpt { core.send(chat, reply.join("\n")).await.unwrap(); for chunk in &files_to_send { |
︙ | |||
198 199 200 201 202 203 204 205 | 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | + - + + - + + | tg, recipients, } } pub async fn debug<'b, S>(&self, msg: S) -> Result<()> where S: Into<Cow<'b, str>> { task::sleep(Duration::from_secs(5)).await; self.tg.send(SendMessage::new(self.default, msg) |
︙ |