Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

196
Vistas
Talk.js does not give other user account to user

I am new to Talk.js and am learning currently. I ran into an error where I use the classic inbox and every user that goes on uses the same account in the 1:1 chat. I loaded the library in my HTML already.

Talk.ready.then(function () {
  var me = new Talk.User({
    id: '111112',
    name: 'sus',
    email: 'alice@example.com',
    photoUrl: 'https://demo.talkjs.com/img/alice.jpg',
    welcomeMessage: 'Hello',
  });
  window.talkSession = new Talk.Session({
    appId: 'HIDDEN',
    me: me,
  });
  var other = new Talk.User({
    id: '111111',
    name: 'sussy',
    email: 'Sebastian@example.com',
    photoUrl: 'https://demo.talkjs.com/img/sebastian.jpg',
    welcomeMessage: "Hello"
  });

  var conversation = talkSession.getOrCreateConversation(
    Talk.oneOnOneId(me, other)
  );
  conversation.setParticipant(me);
  conversation.setParticipant(other);

  var inbox = talkSession.createInbox({ selected: conversation });
  inbox.mount(document.getElementById('talkjs-container'));
});
<!-- minified snippet to load TalkJS without delaying your page  this is basicly the contaner and the loading-->
<script>
(function(t,a,l,k,j,s){
s=a.createElement('script');s.async=1;s.src="https://cdn.talkjs.com/talk.js";a.head.appendChild(s)
;k=t.Promise;t.Talk={v:3,ready:{then:function(f){if(k)return new k(function(r,e){l.push([f,r,e])});l
.push([f])},catch:function(){return k&&new k()},c:l}};})(window,document,[]);
</script>

<!-- container element in which TalkJS will display a chat UI -->
<div id="talkjs-container" style="width: 90%; margin: 30px; height: 500px">
  <i>Loading chat...</i>
</div>
    <script src="script.js"></script>

It doesn't work because I did not put in my real application id, If you want to run it yourself, sign up or sign in to talkJs and insert your id in. (test app id where "BLOCKED " is)

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda