Bug 305508

Summary: Option to always open chats in the plasmoid instead of window.
Product: [Unmaintained] telepathy Reporter: Alex Tsi <alexhs.tsi>
Component: chat-plasmoidAssignee: Telepathy Bugs <kde-telepathy-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: wishlist CC: aleixpol, kde, kde, mail
Priority: NOR    
Version: 0.4.1   
Target Milestone: Future   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Alex Tsi 2012-08-20 19:58:23 UTC
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.
Comment 1 David Edmundson 2012-09-21 14:36:50 UTC
That makes sense, confirming.
Comment 2 Lasath Fernando 2012-12-25 06:07:46 UTC
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.
Comment 3 David Edmundson 2012-12-25 17:34:57 UTC
> AFAIK in ktp-common-internals, 

We are able to change ktp-common-internals :) 
Feel free to propose any modifications.
Comment 4 David Edmundson 2012-12-25 17:37:59 UTC
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?
Comment 5 Lasath Fernando 2012-12-26 00:12:42 UTC
(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.
Comment 6 Aleix Pol 2013-05-13 02:02:40 UTC
#5 yes, the case ATM is that text-ui will be shown always. The only case that differs is the contact list plasmoid.
Comment 7 David Edmundson 2013-05-13 11:05:46 UTC
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)
Comment 8 Christoph Cullmann 2024-09-18 18:14:42 UTC
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.