0

sending message using below function

function sendTextMessage(to, message) {
    var profile = api.getProfile(to, 0);
    var id = parseInt(Math.random()*10000);
    profile.sendMessage(id, message);
}

after that when i log listner response using

MesiboListener.prototype.Mesibo_OnMessageStatus = function(m) {
    console.log("Mesibo_OnMessageStatus: from "  
            + m.peer + " status: " + m.status);
}

it show Mesibo_OnMessageStatus: from 4688250 status: 1 but not change status to 2(delivered)

  • Messages can not be delivered till the destination user comes online. It's difficult to comment based on the limited information you posted. Maybe host your code somewhere which two users and send us links, we will help you – mesibo Mar 11 '22 at 13:35
  • @mesibo i have created two diffrent user access token and it already displayed online in green letters in mesibo acount holder dashboard which i m using. – Maulik Patel Mar 14 '22 at 06:35

1 Answers1

0

We answered you on the mesibo tickets with minor corrections in your code (check SPAM if you have not received it).

You are giving UID as the destination. You should give the address as the destination. Try the code below

var demo1_user_token = '81...'; 
var demo1_destination = 'vivek';
var demo_appid = 'com.f...';
var demo2_user_token = 'c9...';
var demo2_destination = 'maulik';
mesibo
  • 3,970
  • 6
  • 25
  • 43