missing metadata in friend request for offline users

We are trying to customize the friend request in XMPP (Ejabberd) so that we can send additional metadata in friend request as shown below(shows the request as logged in ejabberd.log file). The issue is when the friend is offline, XMPP does not send the additional metadata (jidValue, profileImageURL etc.) when the friend request is eventually delivered to end user when they come online. But if the friend is online, when the request is sent, all the additional metadata is indeed delivered. Does anybody know why for offline users, the additional metadata is not sent and how it can possibly be resolved?

Here is the request log:

<presence type=\"subscribe\" to=\"17032345678jinglebells@chat.chatter.io\" jidValue=\"1408123467abcd@chat.chatter.io/MCRJ\" profileImageURL=\"https://jabber.chatter.io/profiles/chatapp_profile56646b3323232.232323232.png\" age=\"0\" gender=\"\" message=\"\"><x xmlns=\"vcard-temp:x:update\"><photo/></x></presence>
packet {xmlel,<<"presence">>,[{<<"type">>,<<"subscribe">>},{<<"to">>,<<"17032345678jinglebells@chat.chatter.io">>},{<<"jidValue">>,<<"1408123467abcd@chat.chatter.io/MCRJ">>},{<<"profileImageURL">>,<<"https://jabber.chatter.io/profiles/chatapp_profile56646b3323232.232323232.png">>},{<<"age">>,<<"0">>},{<<"gender">>,<<>>},{<<"message">>,<<>>}],[{xmlel,<<"x">>,[{<<"xmlns">>,<<"vcard-temp:x:update">>}],[{xmlel,<<"photo">>,[],[]}]}]}
Syndicate content