Summary: | telepathy-text-ui does not reconnect correctly to chatroom | ||
---|---|---|---|
Product: | [Unmaintained] telepathy | Reporter: | Balcaen John <balcaen.john> |
Component: | text-ui | Assignee: | Telepathy Bugs <kde-telepathy-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kde, mail |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | 0.4.0 | ||
Platform: | Mageia RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Balcaen John
2011-12-06 11:15:34 UTC
*** Bug 291630 has been marked as a duplicate of this bug. *** Just looked at the code, error is in: ChatTab::onConnectionStatusChanged We need to check the targetHandleType and act appropriately. Git commit bb2b9dd77f5695bfdf80f98c138aee044ddeff50 by David Edmundson. Committed on 16/01/2012 at 19:38. Pushed by davidedmundson into branch 'master'. Correctly rejoin chatrooms on reconnect Reviewed by: Martin Klapetek M +11 -1 app/chat-tab.cpp A +7 -0 app/defines.h [License: UNKNOWN] * M +3 -1 app/main.cpp The files marked with a * at the end have a non valid license. Please read: http://techbase.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page. http://commits.kde.org/telepathy-text-ui/bb2b9dd77f5695bfdf80f98c138aee044ddeff50 Sorry, need to REOPEN. The committed patch doesn't work here (still doesn't reconnect), while the previous nopasted patch (see below) works just fine. Just verified by locally reverting to the previous commit and testing the "old" patch again. diff --git a/app/chat-tab.cpp b/app/chat-tab.cpp index a8f6626..5a16f45 100644 --- a/app/chat-tab.cpp +++ b/app/chat-tab.cpp @@ -80,6 +80,14 @@ void ChatTab::onConnectionStatusChanged(Tp::ConnectionStatus status) { // request a new text channel for the chat if (status == Tp::ConnectionStatusConnected) { - account()->ensureTextChat(textChannel()->targetId(), QDateTime::currentDateTime(), QLatin1String("org.freedesktop.Telepathy.Client.KTp.TextUi")); + if (textChannel()->targetHandleType() == Tp::HandleTypeContact) { + account()->ensureTextChat(textChannel()->targetId(), + QDateTime::currentDateTime(), + QLatin1String("org.freedesktop.Telepathy.Client.KTp.TextUi")); + } else if (textChannel()->targetHandleType() == Tp::HandleTypeRoom) { + account()->ensureTextChatroom(textChannel()->targetId(), + QDateTime::currentDateTime(), + QLatin1String("org.freedesktop.Telepathy.Client.KTp.TextUi")); + } } } Git commit 5dfed1cf2127e27901bd8c6571cb682674aa0e3a by Martin Klapetek. Committed on 16/01/2012 at 22:31. Pushed by mklapetek into branch 'master'. Use correct string for text-ui client path M +1 -1 app/defines.h http://commits.kde.org/telepathy-text-ui/5dfed1cf2127e27901bd8c6571cb682674aa0e3a Works now! |