Top

NodeJS getAvatar don't work.

Comments

2 comments

  • Pascal BORSCHNECK

    Hi, thanks, creating a Zendesk ticket

    0
    Comment actions Permalink
  • Vincent BERDER

    Hello Alejandro,

     

    Could you try with sdk 1.42.3. And did you also provide the second parameter of the getAvatarByContactId ?

    /**
    * @public
    * @method getAvatarByContactId
    * @instance
    * @param {string} id The contact id
    * @param {string} lastAvatarUpdateDate use this field to give the stored date ( could be retrieved with contact.lastAvatarUpdateDate )
    * if missing or null in case where no avatar available a local module file is provided instead of URL
    * @memberof Contacts
    * @description
    * Get a contact avatar by his contact id
    * @return {String} Contact avatar URL or file
    */

    Example :
    var list = that.rainbowSDK.contacts.getAll();
    if (list) {
    list.forEach(function (contact) {
    that.logger.log("debug", "MAIN - [start ] :: contact : ", contact);
    let avatar = that.rainbowSDK.contacts.getAvatarByContactId(contact.id, contact.lastAvatarUpdateDate);
    that.logger.log("debug", "MAIN - [start ] :: contact : ", contact, "avatar : ", avatar);
    });
    } else {
    that.logger.log("debug", "MAIN - [start ] :: contacts list empty");
    }

    Best regards,
    Vincent.
    0
    Comment actions Permalink

Please sign in to leave a comment.

Still can't find what you need?

  • Contact Us

    Do you have any question about Rainbow? Leave us a message to get more information.

    Contact
  • Ask the Community

    Do you need help? Ask your questions to the Community and get answers from other Rainbow users.

    Post message