Mercurial > prosody-modules
changeset 733:dd3b30c0dc8a
mod_vjud: Switch first and last name in results to be correct.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 01 Jul 2012 13:15:40 +0200 |
parents | 317e142fe6f1 |
children | 81de1e446bfe |
files | mod_vjud/mod_vjud.lua |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_vjud/mod_vjud.lua Sun Jul 01 12:47:51 2012 +0200 +++ b/mod_vjud/mod_vjud.lua Sun Jul 01 13:15:40 2012 +0200 @@ -94,8 +94,8 @@ if vCard then reply:add_child(item_template.apply{ jid = username..at_host; - first = vCard.N and vCard.N[1] or nil; - last = vCard.N and vCard.N[2] or nil; + first = vCard.N and vCard.N[2] or nil; + last = vCard.N and vCard.N[1] or nil; nick = vCard.NICKNAME and vCard.NICKNAME[1] or username; email = vCard.EMAIL and vCard.EMAIL[1] or nil; }); @@ -110,8 +110,8 @@ (vCard.EMAIL and vCard.EMAIL[1] == email)) then reply:add_child(item_template.apply{ jid = username..at_host; - first = vCard.N and vCard.N[1] or nil; - last = vCard.N and vCard.N[2] or nil; + first = vCard.N and vCard.N[2] or nil; + last = vCard.N and vCard.N[1] or nil; nick = vCard.NICKNAME and vCard.NICKNAME[1] or username; email = vCard.EMAIL and vCard.EMAIL[1] or nil; });