Hocuri
0ab54da2eb
refactor: Move vcard code to their own file ( #6776 )
...
So that we can directly link to the tests from the new Autocrypt
specification.
2025-04-07 16:48:21 +02:00
Hocuri
d2803c4305
feat: Parse proton vCards again ( #6771 )
...
Proton vCards now contain this extra `PREF=1` parameter, which threw off
our parsing.
This PR fixes both and adds a test.
2025-04-07 15:11:51 +02:00
link2xt
e5b79bf405
refactor: replace once_cell::sync::Lazy with std::sync::LazyLock
2025-04-04 20:51:37 +00:00
link2xt
0973a46245
fix: make vCard parsing more robust in case of trailing newlines
...
Contacts should be added only if there is an END:VCARD
detected, not because we found the end of file.
2025-02-06 22:25:47 +00:00
link2xt
e22d980845
fix: use CRLF newlines in vCards
...
This is a requirement from
<https://datatracker.ietf.org/doc/html/rfc6350#section-3.2 >
2025-02-06 21:54:12 +00:00
link2xt
c18a476806
refactor: forbid clippy::string_slice
2024-11-18 23:57:57 +00:00
link2xt
3235c8bc9f
refactor: forbid clippy::indexing_slicing
...
It is impossible to allow this in the new code now.
2024-11-18 21:58:48 +00:00
Hocuri
53217d5eb8
chore: Remove two TODOs that are not worth fixing ( #5726 )
...
About the first TODO: I tried this out, but it didn't actually improve
things, for two reasons:
1. The trick with `#![cfg_attr(not(test),
warn(clippy::indexing_slicing))]` that enables the lint everywhere
except for tests doesn't work with workspace-wide lints. (Context: We
want to lint against indexing because it might panic, but in a test
panicking is fine, so we don't want to enable the lint in tests).
2. Most of our crates have different sets of lints right now, so it
would only be very few crates that use the workspace-wide list of lints.
About the second TODO:
It's not feasible right now to fully parse vCards, and for our
good-enough parser the current behavior is fine, I think. If we fail to
parse some realworld vCards because of this, we can still improve it.
2024-07-01 18:28:06 +00:00
Hocuri
ee2fffb52b
feat: Parse vcards exported by protonmail ( #5723 )
2024-06-29 09:45:51 +02:00
Hocuri
ac198b17bf
fix: Correctly sanitize input everywhere ( #5697 )
...
Best reviewed commit-by-commit; the commit messages explain what is
done.
2024-06-28 14:36:09 +02:00
Hocuri
a5d14b377d
refactor: Deduplicate dependency versions ( #5691 )
...
Deduplicate dependency versions by specifying them only once in
Cargo.toml for the whole workspace under `[workspace.dependencies]`.
2024-06-17 07:51:54 +00:00
iequidoo
5f790c1dbc
fix(contact-tools): parse_vcard: Support \r\n newlines
2024-05-21 17:40:07 +00:00
iequidoo
6290ed8752
api: Add make_vcard() ( #5203 )
...
Add a function returning a vCard containing contacts with the given ids.
2024-05-15 21:49:59 -03:00
iequidoo
a38f0ba09e
refactor: VcardContact: Change timestamp type to i64
...
- u64 only adds unnecessary conversions.
- `Contact::last_seen` is also `i64`, so make timestamps such everywhere.
2024-05-15 21:07:24 -03:00
iequidoo
191624f334
refactor(contact-tools): VcardContact: rename display_name to authname
...
It's actually `deltachat::contact::Contact::authname` by semantics. `display_name`/`name` shouldn't
be shared, it's the name given by the user locally.
2024-05-15 21:07:24 -03:00
Hocuri
5292a49bb1
fix: parsing vCards with avatars exported by Android's "Contacts" app
2024-05-15 21:07:24 -03:00
iequidoo
22f01a2699
api: Add Viewtype::Vcard ( #5202 )
...
Co-authored-by: Hocuri <hocuri@gmx.de >
2024-05-15 21:07:24 -03:00
iequidoo
95238b6e17
api(jsonrpc): Add parse_vcard() ( #5202 )
...
Add a function parsing a vCard file at the given path.
Co-authored-by: Hocuri <hocuri@gmx.de >
Co-authored-by: Asiel Díaz Benítez <asieldbenitez@gmail.com >
2024-05-15 21:07:24 -03:00
iequidoo
2eceb4be29
feat(contact-tools): Add make_vcard()
...
Add a function making a vCard containing given `VcardContact`s.
2024-05-03 23:52:51 -03:00
iequidoo
ae7ff17ba2
feat(contact-tools): Support parsing profile images from "PHOTO:data:image/jpeg;base64,..."
2024-05-03 23:52:51 -03:00
Hocuri
026f678452
feat: Parsing vCards for contacts sharing ( #5482 )
...
Co-authored-by: iequidoo <dgreshilov@gmail.com >
2024-05-03 22:44:09 -03:00
Hocuri
5d34b225b7
Split off functional contact tools into its own crate ( #5444 )
...
I would like to implement
https://github.com/deltachat/deltachat-core-rust/issues/5422 in its own
crate, but it will depend on some functions that are in the `deltachat`
crate.
So, this PR extracts these functions into its own crate so that I can
add https://github.com/deltachat/deltachat-core-rust/issues/5422 into
the new crate.
2024-04-16 19:01:25 +02:00