Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

83
Views
How to get user photo in dialog list of Quickblox javascript sdk

I have tried using below code in loop of dialog. I get the url of photo in getInfo function, but unable to access that url when dialog is rendered. Can anyone please help me to solve this issue.

     _.each(dialogs, function (dialog) {
        self._cache[dialog._id] = 
            helpers.compileDialogParams(dialog);
            var searchParams = {filter: { field: 'id', param: 'in', value: val }};
            QB.users.listUsers(searchParams, function(error, result) {
              if(typeof result.items[0].user.blob_id === 'number'){
                 self._cache[dialog._id]['blob_id'] = result.items[0].user.blob_id;
              }
              QB.content.getInfo(blob_id, function(error, result) {
                 if (error) {
                    done.fail("Get file information by ID error: " + JSON.stringify(error));
                 }else {
                     if(result.blob){
                        var fileUID = result.blob.uid;
                        var fileUrl = QB.content.privateUrl(fileUID);
                        self._cache[dialog._id]['fileUrl'] = fileUrl;
                     }else{
                        var fileUrl = null;
                        self._cache[dialog._id]['fileUrl'] = fileUrl;
                     }
                 }
              });
            });
          self.renderDialog(self._cache[dialog._id]);
    }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!