profanity icon indicating copy to clipboard operation
profanity copied to clipboard

Add XEP-0054 vCard support

Open techmetx11 opened this issue 3 years ago • 4 comments

Only nicknames, photos, birthdays, addresses, telephone numbers, emails, JIDs, titles, roles, notes, and URLs are supported

techmetx11 avatar Sep 24 '22 22:09 techmetx11

@mdosch can you test whether it behaves like you imanged when you opened the issue?

jubalh avatar Sep 25 '22 08:09 jubalh

I tried out requesting vcards and this are my findings:

  • /vcard get does autocompletion through occupants in a MUC but not through roster in the main window
  • /vcard get in a 1-1 chat shows my own vcard, not the one of the contact

mdosch avatar Sep 26 '22 17:09 mdosch

I tried out requesting vcards and this are my findings:

* `/vcard get` does autocompletion through occupants in a MUC but not through roster in the main window

* `/vcard get` in a 1-1 chat shows my own vcard, not the one of the contact

Thanks

techmetx11 avatar Sep 26 '22 17:09 techmetx11

First review looks good! Thanks for your work! I added some comments/questions.

Also: Did you test the new functionality with valgrind to check for any leaks? It's described here: https://github.com/profanity-im/profanity/blob/master/CONTRIBUTING.md If you need any help about that, please let me know.

Yes, I have. Thankfully the only memory leaks I found were with the vcardwin get string/title function

techmetx11 avatar Sep 29 '22 17:09 techmetx11

Weird, it compiled fine for me

techmetx11 avatar Oct 14 '22 20:10 techmetx11

 src/xmpp/vcard.c: In function '_vcard_photo_result':
src/xmpp/vcard.c:1374:18: error: too many arguments to function 'call_external'

jubalh avatar Oct 14 '22 20:10 jubalh

 src/xmpp/vcard.c: In function '_vcard_photo_result':
src/xmpp/vcard.c:1374:18: error: too many arguments to function 'call_external'

Oh, I forgot Sorry my bad :3

techmetx11 avatar Oct 14 '22 20:10 techmetx11

Great! I'll try to review soon. Please read this and this too. After this you can squash your commits together in a way that makes sense.

jubalh avatar Oct 14 '22 21:10 jubalh

AFAIK @sjaeckel plans to improve some parts of this PR with @techmetx11, so setting review on him. I still think in the meantime you could squash the commits together (and rebase on latest master to remove the conflict in cmd_ac.c) @techmetx11 :)

jubalh avatar Oct 18 '22 12:10 jubalh

AFAIK @sjaeckel plans to improve some parts of this PR with @techmetx11, so setting review on him.

I don't have the time for a deeper review and I don't want to block this, so I removed myself from the reviewer list.

sjaeckel avatar Oct 19 '22 06:10 sjaeckel

Thanks for your contribution @techmetx11

jubalh avatar Oct 20 '22 13:10 jubalh