<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">sip:mateusbellomo@sip.antisip.com</a>)?<br></div><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 class="HOEnZb"><div class="h5">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 class="h5">
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>