Problems with inviting new contacts to 1:1 chat

Francesco Nwokeka francesco.nwokeka at gmail.com
Thu Mar 24 11:30:34 CET 2011


Hi guys,
	I'm asking help from you because I can't quite figure this one out. I'm finishing off the request 
for inviting contacts to a chat.
What i have now is all the gui set up with the contacts to choose from as well as all the right 
signals/slots in the right place.
Here is where I think some problems are:

1- invite request

>void ChatWindow::onInviteActionToggled()
>{
>    // create request for client
>    ChatTab *tab = qobject_cast<ChatTab*>(m_tabWidget->currentWidget());

>    // generate and get invite list for current account
>    QList<Tp::ContactPtr>invitees = m_inviteDialog->contactInvitees(tab->account());
>
>    // just debug info
>    for(int i = 0; i < invitees.count(); i++)
>        qDebug()<<"want to add to chat: " << invitees.at(i)->alias();
>
>    if(!invitees.isEmpty()) {
>        qDebug( "INVITING" );
>        QList<Tp::ChannelPtr>chans;
>        chans.append(tab->textChannel());   // current text channel i have, 1:1
>
>        tab->account()->createConferenceTextChat(chans,invitees);
>    }
>}

as you can see, the "Tp::Account::createConferenceTextChat requires I pass the channels and the 
contacts to create the conference chat. But starting from a 1:1 chat i only have that textChannel to 
pass to the method.
In fact, once the conference is later created "AbstractClientHandler::handleChannels" sees that it's 
a multi-chat and telepathy-chat-handler creates a "group tab widget".

Now here is the second problem ( related to the first ).
When writing in the new widget, my message is sent only to the user whom which I was already 
chatting before creating the conferenceTextChat.

1 -> me and mario are talking.
2 -> i want to invite a friend to the conversation
3 -> mario is the only one that gets my messagges.

Can anyone show me the light here?

Thanks,
	Francesco( nwoki )


More information about the KDE-Telepathy mailing list