Commit 38084ca
authored
Generate correct fake imcs for voice and video note drafts (#597)
A draft carries a note's file, duration, waveform and length flat, while
the input message content it stands for nests them in `inputVoiceNote' and
`inputVideoNote'. `telega-ins--draft-content-one-line' relabelled the
draft's `:@type' and passed the flat fields on, so
`telega-ins--input-content-one-line' had to accept either shape to serve
both callers.
Moved the fields into the wrapper where the fake imc is built, so only one
shape reaches the renderer and its fallback to the content itself is no
longer needed. A note's `file_path' becomes the `inputFileLocal' the
wrapper expects, which the relabelling never provided.1 parent 97406c7 commit 38084ca
2 files changed
Lines changed: 41 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4211 | 4211 | | |
4212 | 4212 | | |
4213 | 4213 | | |
4214 | | - | |
4215 | | - | |
4216 | | - | |
4217 | | - | |
4218 | | - | |
| 4214 | + | |
4219 | 4215 | | |
4220 | 4216 | | |
4221 | 4217 | | |
| |||
4227 | 4223 | | |
4228 | 4224 | | |
4229 | 4225 | | |
4230 | | - | |
4231 | | - | |
| 4226 | + | |
4232 | 4227 | | |
4233 | 4228 | | |
4234 | 4229 | | |
| |||
4359 | 4354 | | |
4360 | 4355 | | |
4361 | 4356 | | |
4362 | | - | |
4363 | | - | |
4364 | | - | |
4365 | | - | |
4366 | | - | |
4367 | | - | |
4368 | | - | |
4369 | | - | |
| 4357 | + | |
| 4358 | + | |
| 4359 | + | |
| 4360 | + | |
| 4361 | + | |
| 4362 | + | |
| 4363 | + | |
| 4364 | + | |
| 4365 | + | |
| 4366 | + | |
| 4367 | + | |
| 4368 | + | |
| 4369 | + | |
| 4370 | + | |
| 4371 | + | |
| 4372 | + | |
| 4373 | + | |
| 4374 | + | |
| 4375 | + | |
| 4376 | + | |
| 4377 | + | |
| 4378 | + | |
| 4379 | + | |
| 4380 | + | |
| 4381 | + | |
| 4382 | + | |
4370 | 4383 | | |
4371 | 4384 | | |
4372 | 4385 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
304 | | - | |
| 304 | + | |
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
309 | 313 | | |
310 | 314 | | |
311 | 315 | | |
| |||
323 | 327 | | |
324 | 328 | | |
325 | 329 | | |
326 | | - | |
327 | | - | |
| 330 | + | |
| 331 | + | |
328 | 332 | | |
329 | 333 | | |
330 | | - | |
331 | | - | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
332 | 337 | | |
333 | 338 | | |
334 | | - | |
335 | | - | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
336 | 342 | | |
337 | 343 | | |
338 | 344 | | |
| |||
0 commit comments