Summary: | Any way for open KDE Telepathy chat window in ktp-text-ui via cli or dbus command | ||
---|---|---|---|
Product: | [Unmaintained] telepathy | Reporter: | Murz <MurzNN> |
Component: | text-ui | Assignee: | Telepathy Bugs <kde-telepathy-bugs> |
Status: | RESOLVED UNMAINTAINED | ||
Severity: | normal | CC: | kde, mklapetek |
Priority: | NOR | ||
Version: | 0.9.0 | ||
Target Milestone: | Future | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Murz
2015-09-02 06:25:08 UTC
And will be good to provide this way to xmpp and other configured protocols by default for xdg-command: xdg-open xmpp:contactname@example.com Same thing is in Kopete: qdbus org.kde.kopete /Kopete openChat “$contact” And maybe there are way to open chat via krunner plugin from cli, something like: qdbus org.kde.krunner /App query ktp-text-ui contactname@example.com qdbus org.kde.krunner /App contactrunner contactname@example.com etc. In theory you could use the Telepathy dbus api directly. My suggestion - run bustle, start a chat from contact list, stop bustle, look at the dbus request it sends. I'm not entirely sure this will be possible at all though. You can also use KRunner to start chats. The problem in dbus usage is that it is available only if ktp-text-ui application is open (in memory), but if I close ktp-text-ui window - dbus commands stops working. So command line argument will work much easier and stable. I will try to debug dbus commands via bustle, thanks for suggestion. Via krunner I have found some way to find contact: qdbus org.kde.krunner /App querySingleRunner ktp_contacts "Contact_nickname" But this way searching only via "Contact_nickname", via URI like contactname@example.com it can't find contact. And this command opens krunner window, that need additional manually click for execute action. I can't find the way to auto-execute current action via cli, so I create feature request: https://bugs.kde.org/show_bug.cgi?id=352146 So at now I have see no workaround for this problem. >The problem in dbus usage is that it is available only if ktp-text-ui application is open That's not true. 1) for what you're doing you don't want to send a dbus message to KTp anywhere, you want to message the relevant backend to say you want to start a chat; which in turn will start a chat 2) If you did were to send a dbus message to the text-ui it would autostart it The entire Telepathy spec is built on DBus: http://telepathy.freedesktop.org/spec/ in particular you want: http://telepathy.freedesktop.org/spec/Channel_Dispatcher.html David Edmundson, thanks for the links. Maybe I misunderstand, but Channel_Dispatcher dbus calls will send messages directly to contact, instead of opening Text UI chat window, or not? And org.freedesktop.Telepathy.Client.KTp.TextUi is available via 'qdbus | grep Telepathy' command only when I open TextUi window, so with closed window no app can receive my query. Can you, please, provide some working example via cli dbus command, that opens chat window for some contact? Thanks. As suggested before, please start Bustle, start capturing, start a chat from contact list, stop capturing. That will give you exactly what you need. I've just tried and the dbus call you want is service: org.freedesktop.Telepathy.ChannelDispatcher path: /org/freedesktop/Telepathy/ChannelDispatcher iface: org.freedesktop.Telepathy.ChannelDispatcher.EnsureChannelWithHints For arguments list, see either your Bustle log or http://telepathy.freedesktop.org/spec/Channel_Dispatcher.html#Method:EnsureChannelWithHints I believe it may actually be easier to write a small command-line utility that would just take account id and contact id and uses TelepathyQt directly. Thank you for the bug report. As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists. If this bug is no longer persisting or relevant please change the status to resolved. 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. |