Change nickname via prosody plugin

Hi there,
i need a little hint how i can change the nickname of a user. As I understand from the documentation here

i have to change presence. My code as follows :

local origin = event.origin
local req = st.presence({from=occupant.bare_jid.."/xx",to=occupant.bare_jid.."/xy"});

req then looks like this

<presence from='d05a5fe2-cb9a-4b9d-bcf2-215885831795@meet.jitsi/xx' to='d05a5fe2-cb9a-4b9d-bcf2-215885831795@meet.jitsi/xy'/> 

bute the nickname is not changing. I need some advice. Thank you.