Skip to content

Conversation

@link2xt
Copy link
Collaborator

@link2xt link2xt commented Feb 15, 2020

#1256

  • Set FN and EMAIL fields
  • base64-encode avatar blobfile into vCard
  • Do not base64-encode vCard itself
  • Parse avatars from vCard

@r10s
Copy link
Contributor

r10s commented Feb 15, 2020

the currently released versions would pass a vcard from Chat-User-Avatar directly to the ui, so we should be a bit careful about what we're sending out.

i think, we should roll out this in two steps:

  • first, pushing a version that can accept jpg and vcard avatars but still sends out jpg
  • a month later, with the next version, we can then send out a vcard

@r10s
Copy link
Contributor

r10s commented Feb 17, 2020

wondering if we shoud drop the Chat-Group-Avatar and Chat-User-Avatar headers and just use well-known filenames as for location-streaming. this could make things with outlook easier - less headers, less pain :)

by repeating the email-address resp. the group-id in the file, we can make sure, messages forwarded in normal MUA do not harm.

we could use a simple name as user.vcard (and maybe group.vcard if we want to target group-avatar handling in the same pr)

@hpk42
Copy link
Contributor

hpk42 commented Oct 19, 2020

@link2xt i suggest to retire this PR and convert it into an issue referencing the branch if useful.

@link2xt
Copy link
Collaborator Author

link2xt commented Nov 22, 2020

Thunderbird has an option "Prefers to receive messages formatted as:". When set to "Plain Text" (other options are "Unknown" and "HTML"), it adds x-mozilla-html:FALSE line to vCard. Makes sense to add this one for Delta Chat vCards too, Thunderbird uses this information to decide on the format when sending to users from address book.

Alexander Krotov added 2 commits November 23, 2020 00:37
Otherwise they show up as attachments in the chat.
@link2xt
Copy link
Collaborator Author

link2xt commented Nov 22, 2020

vcard crate creates vCards but does not parse them. Now need ical crate to parse them.

@link2xt
Copy link
Collaborator Author

link2xt commented Nov 23, 2020

Seems ical crate mimics ical.js and just the same does not parse vCard 2.1, which Thunderbird sends. Not a big deal as DC is going to generate vCard 4.0, but this hack from Thunderbird may be useful if we ever want to parse vCard 2.1: https://hg.mozilla.org/comm-central/file/4c8d82dc0948dd9aaedbc9e21f63ef5f8d96736c/mailnews/addrbook/modules/VCardUtils.jsm#l100

@link2xt
Copy link
Collaborator Author

link2xt commented Nov 23, 2020

Made a fix for ical crate: Peltoche/ical-rs#37

@r10s
Copy link
Contributor

r10s commented Jan 19, 2021

note: as discussed recently on another channel, before we continue working on this pr, we will check if maybe adding the image to the "body part header" might be the better option.

@link2xt
Copy link
Collaborator Author

link2xt commented Feb 13, 2021

This is replaced with #2232

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants