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
poezio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
178
Issues
178
List
Boards
Labels
Service Desk
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poezio
poezio
Commits
c7c3ea49
Commit
c7c3ea49
authored
Feb 25, 2019
by
ge0rg
Committed by
Maxime Buquet
Mar 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MUC: update the presence window after each ~10 incoming presences
parent
8cbd8dab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
poezio/tabs/muctab.py
poezio/tabs/muctab.py
+8
-5
No files found.
poezio/tabs/muctab.py
View file @
c7c3ea49
...
...
@@ -448,8 +448,9 @@ class MucTab(ChatTab):
if
presence
[
'type'
]
==
'error'
:
self
.
core
.
room_error
(
presence
,
self
.
name
)
elif
not
self
.
joined
:
if
'110'
in
status_codes
or
self
.
own_nick
==
presence
[
'from'
].
resource
:
self
.
process_presence_buffer
(
presence
)
own
=
'110'
in
status_codes
or
self
.
own_nick
==
presence
[
'from'
].
resource
if
own
or
len
(
self
.
presence_buffer
)
>=
10
:
self
.
process_presence_buffer
(
presence
,
own
)
else
:
self
.
presence_buffer
.
append
(
presence
)
return
...
...
@@ -467,7 +468,7 @@ class MucTab(ChatTab):
self
.
input
.
refresh
()
self
.
core
.
doupdate
()
def
process_presence_buffer
(
self
,
last_presence
):
def
process_presence_buffer
(
self
,
last_presence
,
own
):
"""
Batch-process all the initial presences
"""
...
...
@@ -479,11 +480,13 @@ class MucTab(ChatTab):
self
.
handle_presence_unjoined
(
stanza
,
deterministic
)
except
PresenceError
:
self
.
core
.
room_error
(
stanza
,
stanza
[
'from'
].
bare
)
self
.
handle_presence_unjoined
(
last_presence
,
deterministic
,
own
=
True
)
self
.
presence_buffer
=
[]
self
.
handle_presence_unjoined
(
last_presence
,
deterministic
,
own
)
self
.
users
.
sort
()
# Enable the self ping event, to regularly check if we
# are still in the room.
self
.
enable_self_ping_event
()
if
own
:
self
.
enable_self_ping_event
()
if
self
.
core
.
tabs
.
current_tab
is
not
self
:
self
.
refresh_tab_win
()
self
.
core
.
tabs
.
current_tab
.
refresh_input
()
...
...
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