Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
gajim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
202
Issues
202
List
Boards
Labels
Service Desk
Milestones
Merge Requests
22
Merge Requests
22
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gajim
gajim
Commits
20cb0f09
Commit
20cb0f09
authored
Aug 31, 2019
by
Philipp Hörist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
StartChat: Handle <gone> error better
- Show reason when group chat is gone - Follow redirect if one exists
parent
674e5ab2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
gajim/gtk/start_chat.py
gajim/gtk/start_chat.py
+17
-1
No files found.
gajim/gtk/start_chat.py
View file @
20cb0f09
...
...
@@ -28,7 +28,9 @@
from
gajim.common.helpers
import
validate_jid
from
gajim.common.helpers
import
to_user_string
from
gajim.common.helpers
import
get_groupchat_name
from
gajim.common.helpers
import
get_alternative_venue
from
gajim.common.i18n
import
_
from
gajim.common.i18n
import
get_rfc5646_lang
from
gajim.common.const
import
AvatarSize
from
gajim.common.const
import
MUC_DISCO_ERRORS
...
...
@@ -57,6 +59,7 @@ def __init__(self):
self
.
_keywords
=
[]
self
.
_destroyed
=
False
self
.
_search_stopped
=
False
self
.
_redirected
=
False
self
.
_ui
=
get_builder
(
'start_chat_dialog.ui'
)
self
.
add
(
self
.
_ui
.
stack
)
...
...
@@ -257,6 +260,7 @@ def _start_new_chat(self, row):
return
self
.
ready_to_destroy
=
False
self
.
_redirected
=
False
self
.
_disco_muc
(
row
.
account
,
row
.
jid
)
else
:
...
...
@@ -272,7 +276,13 @@ def _disco_muc(self, account, jid):
@
ensure_not_destroyed
def
_disco_info_received
(
self
,
account
,
result
):
if
is_error_result
(
result
):
self
.
_set_error
(
result
)
jid
=
get_alternative_venue
(
result
)
if
jid
is
None
or
self
.
_redirected
:
self
.
_set_error
(
result
)
return
self
.
_redirected
=
True
self
.
_disco_muc
(
account
,
jid
)
elif
result
.
is_muc
:
self
.
_muc_info_box
.
set_account
(
account
)
...
...
@@ -284,6 +294,10 @@ def _disco_info_received(self, account, result):
def
_set_error
(
self
,
error
):
text
=
MUC_DISCO_ERRORS
.
get
(
error
.
condition
,
to_user_string
(
error
))
if
error
.
condition
==
'gone'
:
reason
=
error
.
get_text
(
get_rfc5646_lang
())
if
reason
:
text
=
'%s:
\n
%s'
%
(
text
,
reason
)
self
.
_show_error_page
(
text
)
def
_set_error_from_code
(
self
,
error_code
):
...
...
@@ -319,6 +333,8 @@ def _on_select_clicked(self, *args):
self
.
_show_error_page
(
_
(
'You can not join a group chat '
'unless you are connected.'
))
return
self
.
_redirected
=
False
self
.
_disco_muc
(
account
,
selected_row
.
jid
)
def
_set_listbox
(
self
,
listbox
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment