User error to send messages to User with very name.

64 views
Skip to first unread message

Jordan Martins

unread,
Aug 24, 2015, 4:38:28 PM8/24/15
to EasyRTC
Problem to send private messages directed to a User.
Details: I'm using very name of User and not the standard EaseRTC.
When put to the default EaseRTC works. However when I set to for example: Send a message to Paul for Mary, gives error and derro log in ssh shell is:


2015-08-24T20:26:57.430Z - debug   - EasyRTC: [easyrtc.instantMessagin][4kcDqtAP-23nKygWCetp] EasyRTC message received of type [message]
2015-08-24T20:26:57.431Z - warning - EasyRTC: Attempt to request non-existent connection key: 'jmartins_admin'
   debug - sending data ack packet
   debug - websocket writing 6:::13+[{"msgType":"error","serverTime":1440448017431,"msgData":{"errorCode":"MSG_REJECT_GEN_FAIL","errorText":"Message rejected. General failure occurred."}}]
2015-08-24T20:26:57.431Z - error   - EasyRTC: [4kcDqtAP-23nKygWCetp] General message error. Message ignored. 
Stack Trace:
------------
Connection Warning: Attempt to request non-existent connection key: 'jmartins_admin'
    at Object.appObj.connection (/root/node_modules/easyrtc/lib/easyrtc_public_obj.js:1426:22)
    at async.waterfall.targetConnectionObj (/root/node_modules/easyrtc/lib/easyrtc_default_event_listeners.js:601:48)
    at fn (/root/node_modules/easyrtc/node_modules/async/lib/async.js:582:34)
    at Object._onImmediate (/root/node_modules/easyrtc/node_modules/async/lib/async.js:498:34)
    at processImmediate [as _immediateCallback] (timers.js:363:15)
------------

How can I solve this problem?
Take my .js attached
assistente.js

Jordan Martins

unread,
Aug 24, 2015, 4:43:56 PM8/24/15
to EasyRTC
In the above example, the User "joaodavila" sends message to "jmartin_admin"
Note that it says jmartin_admin not connected, when in fact it is even share video and sends messages to the room, since it directed to everyone.

Eric Davies

unread,
Aug 24, 2015, 4:47:25 PM8/24/15
to EasyRTC
When you send a message, you identify the destination by the easyrtcid because it's unique.
User names are not necessarily unique.

Jordan Martins

unread,
Aug 24, 2015, 6:03:04 PM8/24/15
to EasyRTC
Though in my database system, each User is unique. There is two users with the same "username".

I need to find a way to charge the "select" box with "easyrtcid" "Username" and each User.
example:
<option value = "X6IkzSTpNWWrAOmNCetr">jmartin_admin</ option>
which value would be the "easyrtcid"

currently my .js
-------------------------------------
     whoList = easyrtc.idToName (easyrtcid);
     option.text = whoList;
     label.appendChild (option);

It carries only so:
<option> martin_admin</ option>
<option>joaodavila</ option>
<option>anamary</ option>
and so on....
-------------------------------------

You have no idea how do I load like this:
<option value = "X6IkzSTpNWWrAOmNCetr">jmartin_admin</ option>
<option value = "XiOfX2yKJWpNhLU2Cetsr">joaodavila</ option>
<option value = "mF4QxkZJOR4mo3BhCett">anamary</ option>
and so on....???

Jordan Martins

unread,
Aug 24, 2015, 6:42:18 PM8/24/15
to EasyRTC
Friend, you saved me the same. Thank you very much from the heart!
It looked like this:
-----------------------------------------------------
                whoList = easyrtc.idToName(easyrtcid);
var x = document.createElement("option");
    x.appendChild( document.createTextNode(whoList));
    x.value = easyrtcid;
  document.getElementById("mySelect").appendChild(x); 
-------------------------------------------------------

However I continue with an old problem:
The Easertc only works while I am with the shell open ssh.
If I close SSH, EaseRTC stops working.
You know how I solve this?

My srevidor is a Linux Centos

Already, thanks!
Reply all
Reply to author
Forward
0 new messages