<br><br><div class="gmail_quote">On Tue, Feb 19, 2013 at 12:31 PM, George Kiagiadakis <span dir="ltr"><<a href="mailto:kiagiadakis.george@gmail.com" target="_blank">kiagiadakis.george@gmail.com</a>></span> wrote:<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 Tue, Feb 19, 2013 at 2:24 PM, Aleix Pol <<a href="mailto:aleixpol@kde.org">aleixpol@kde.org</a>> wrote:<br>

> Hi,<br>
> I'm having a bit of a weird problem, since it's a bit long to explain, I<br>
> figured it would be better to explain it over the mailing list.<br>
><br>
> As you'll know, we have this pinned contacts in the chat plasmoid. It stores<br>
> a KTP::ContactPtr and when I click the button I start a chat with this<br>
> contact.<br>
> Now the problem that I'm having is that when using it in my system I found<br>
> out that, after putting my laptop on suspend mode, when I click the pinned<br>
> contact a chat gets started with someone else.<br>
><br>
> Do you think it could be that there's no identity integrity after an<br>
> offline/online cycle?<br>
> How do you think this should be fixed?<br>
><br>
<br>
</div></div>I think you shouldn't be storing ContactPtr. Contact objects are part<br>
of a certain Connection, so when the connection changes, weird things<br>
are likely to happen. You should store the contact id instead.<br></blockquote><div><br></div><div>A contact object should not be changing what it represents when a connection resets.</div><div>I don't think that is the case, otherwise we'd be getting a lot more errors elsewhere. Text-ui retains a ContactPtr after going offline. It remains valid. </div>
<div><br></div><div>Generally after a reset the original Tp::ContactPtr becomes useless; any calls to manager() return 0 and it stops getting updated but it doesn't turn into a different contact.</div><div><br></div><div>
I would suspect the problem is in the pinned-contacts-model/conversations-model before investigating elsewhere. That entire area has been under a lot of development on top of experimental code and needs a really good tidy up.</div>
<div><br></div><div>David</div><div><br></div><div><br></div></div>