<div dir="ltr"><div><div>George,<br><br></div>I could make it work but for that I have swaped the initiatorHandle and targetHandle on the onMessageReceived() method. You could see at [1] what I did. Doing this, the channel created has the same parameters when I do a createChannel() [2] operation and the message sent and receive are now appearing at same window [3].<br><br></div>I don't know if this implementation is the most suitable, what do you think?<br><div><br>[1] <a href="https://github.com/resiprocate/resiprocate/compare/master...MateusBellomo:mateus-presence-text#diff-82d1d1ba25e34af050fd6a6c5e5311dfR498">https://github.com/resiprocate/resiprocate/compare/master...MateusBellomo:mateus-presence-text#diff-82d1d1ba25e34af050fd6a6c5e5311dfR498</a><br>[2] <a href="https://github.com/resiprocate/resiprocate/compare/master...MateusBellomo:mateus-presence-text#diff-82d1d1ba25e34af050fd6a6c5e5311dfR650">https://github.com/resiprocate/resiprocate/compare/master...MateusBellomo:mateus-presence-text#diff-82d1d1ba25e34af050fd6a6c5e5311dfR650</a><br>[3] <a href="https://mateusbellomo.wordpress.com/">https://mateusbellomo.wordpress.com/</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-07-22 20:13 GMT-03:00 Mateus Bellomo <span dir="ltr"><<a href="mailto:mateusbellomo@gmail.com" target="_blank">mateusbellomo@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Thanks for the great explanation George.<br><br></div>Doy you know if the TargetID and InitiatorID must have the prefix "sip:" (e.g. <a href="mailto:sip%3Amateusbellomo@sip.antisip.com" target="_blank">sip:mateusbellomo@sip.antisip.com</a>)?<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2016-07-22 2:35 GMT-03:00 George Kiagiadakis <span dir="ltr"><<a href="mailto:gkiagia@tolabaki.gr" target="_blank">gkiagia@tolabaki.gr</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>On <a href="tel:21.07.2016%2022" value="+12107201622" target="_blank">21.07.2016 22</a>:07, Mateus Bellomo wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
Hello,<br>
<br>
I've implemented methods to send and receive text message at<br>
telepathy-resiprocate but I think I'm mixing the sender/receiver<br>
handles. I'm using telepathy-morse [1] as a guide and I would like to<br>
know what is the meaning of contactHandle, targetHandle and<br>
initiatorHandle.<br>
<br>
Right now I can send and receive text messages at<br>
telepathy-resiprocate in Empathy and this is what happening: when I<br>
receive a message (sent from Jitsi to telepathy-resiprocate) it shows<br>
in a window that appears to be a conversation with myself<br>
(telepathy-resiprocate Empathy with telepathy-resiprocate Empathy) and<br>
if I send a message through this same window from<br>
telepathy-resiprocate client, it actually sends the message to myself.<br>
<br>
Any help would be greatly appreciated. Thanks.<br>
<br>
[1]<a href="https://github.com/TelepathyQt/telepathy-morse/blob/master/connection.cpp#L928" rel="noreferrer" target="_blank">https://github.com/TelepathyQt/telepathy-morse/blob/master/connection.cpp#L928</a><br></div></div>
[1]<br>
<br>
</blockquote>
<br>
Generally, the InitiatorHandle [1] is the handle of the *contact* that initiated the channel. If you start talking with Bob on your client, then the initiator is you. If Bob begins chatting with you first, then Bob is the initiator. If Bob starts talking with Alice in a chatroom and then Alice invites you, the initiator is Alice.<br>
<br>
This piece of code that you have linked looks like it is being called when someone else initiates a channel, either 1-to-1 or a room. When it is a 1-to-1 channel (chatMessage == false, ... bad name for a variable I guess), the InitiatorHandle is the peer identifier, which I guess is the remote contact that started the channel. When it is a room channel (chatMessage == true), it uses the message.userId handle as the Initiator, which I don't really know what it represents, but it *should* represent the contact that initiated the chat room (i.e. invited you to join).<br>
<br>
Now the TargetHandle [2] is the handle of the contact or room that this channel allows you to communicate with. This is always the remote contact in 1-to-1 channels and a room identifier in room channels.<br>
<br>
I hope this helps. Note that this code may well be wrong or may rely on protocol-specific quirks that are not the same on SIP, so you should try to understand first what Telepathy expects from your connection manager and then try to provide it in the best way possible.<br>
<br>
[1]. <a href="https://telepathy.freedesktop.org/spec/Channel.html#Property:InitiatorHandle" rel="noreferrer" target="_blank">https://telepathy.freedesktop.org/spec/Channel.html#Property:InitiatorHandle</a>.<br>
[2]. <a href="https://telepathy.freedesktop.org/spec/Channel.html#Property:TargetHandle" rel="noreferrer" target="_blank">https://telepathy.freedesktop.org/spec/Channel.html#Property:TargetHandle</a><br>
<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>