Search code examples
glympse

How to know who send the invite?


I'm using the iOS Glympse SDK to send email invites.... and it works fine.

The email destination user is receiving a glympse invite but no indication of the user nickname sending the invite. The invitation title is "A friend share a glympse with you".

I would like to have "Fred share a glympse with you"

How to do that ?


Solution

  • Sounds like you're on the right track, the sender's nickname is used in the invite email's subject line.

    Make sure the sender's nickname is being set at the correct time. It can only be set after the client app has synced with the Glympse server as described here: https://developer.glympse.com/docs/core/client-sdk/guides/common/programming-guide#configuring-user-profile

    As described in that document, make sure to listen for the GE.PLATFORM_SYNCED_WITH_SERVER event and set the nickname for the sender at that time (or anytime after). This rule exists so that if the nickname or avatar was set on another device, the client will have up to date information before it tries to apply a new nickname.

    Once the sync has occurred, the nickname of the sender is set like this

    GUser user = glympse->getUserManager()->getSelf();
    user->setNickname(CoreFactory::createString("Fred"));