In my opinion users should have an option to choose whether new chats will open in a window or in the chat-plasmoid (if the plasmoid is running). I mean, if i have all chat windows closed and someone send me a message, then the chat-plasmoid takes control. However if i go to my contact list and double-click a contact to start a chat, the chat opens in a window. I would like to have the option to open it in the chat-plasmoid.
That makes sense, confirming.
How would we be able to implement this? AFAIK in ktp-common-internals, Actions::startChat() calls Tp::Account::ensureTextChannel() with the preferredHandler as "org.freedesktop.Telepathy.Client.KTp.TextUi" which means the chat plasmoid gets no say in this. Only way I can think of is to make the preferred handler the chat plasmoid and have it delegate the channel if the option to accept outgoing chats isn't enabled.
> AFAIK in ktp-common-internals, We are able to change ktp-common-internals :) Feel free to propose any modifications.
Just read the API. startChat(account, contact, delegate) /if/ the chat applet is running, and the text-ui is not, then startChat(account, contact, false) will be handled by the chat applet. In the situation that the text-ui is running the startChat(account, contact, false) will as you say, go to the text-ui regardless, but that sounds like what we want?
(In reply to comment #4) > /if/ the chat applet is running, and the text-ui is not, then > startChat(account, contact, false) will be handled by the chat applet. Are you sure? Because I have the plasmoid running now, yet if I try starting a chat from the contact list or krunner, the standard text-ui gets launched and then handles that chat.
#5 yes, the case ATM is that text-ui will be shown always. The only case that differs is the contact list plasmoid.
Yeah I was slightly wrong in comment 5. I think I explained to you in an IM chat once. with the plasmoid running _and_ already handling a channel startChat(account, contact, "org....TextUI", false) will reactive the chat plasmoid startChat(account, contact, "org....TextUI", true) will open the text-ui with the plasmoid running but not handling the channel startChat(account, contact, "org....TextUI", false) will open the text-ui startChat(account, contact, "org....TextUI", true) will open the text-ui with the plasmoid running (either handling the channel or not) startChat(account, contact, "org....Plasmoid", false) will open the chat plasmoid startChat(account, contact, "org....Plasmoid", true) will open the chat plasmoid (unless you merged that patch that gives it a unique DBus path name :S) with the plasmoid running but not handling the channel Tp::Account::ensureTextChat(contact) will open in the plasmoid Tp::Account::ensureTextChat(contact) will open in the plasmoid with the plasmoid not running: Tp::Account::ensureTextChat(contact) will open in the text-ui (or potentially empathy / other random app) Tp::Account::ensureTextChat(contact) will open in the text-ui (or potentially empathy / other random app) with the plasmoid not running: startChat(account, contact, "org....Plasmoid", false) will open the text-ui (or potentially empathy / other random app) startChat(account, contact, "org....Plasmoid", true) will open the text-ui (or potentially empathy / other random app)
Dear user, unfortunately Telepathy is no longer maintained. Please migrate to another solution, e.g. for Jabber a possibility is Kaidan, for Matrix a candidate is NeoChat.