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
175
Issues
175
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
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
e3c1ac40
Commit
e3c1ac40
authored
Aug 21, 2019
by
Madhur Garg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initialized stanza_id in the basetabs.
parent
7e4735b0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
14 deletions
+12
-14
poezio/mam.py
poezio/mam.py
+11
-14
poezio/tabs/basetabs.py
poezio/tabs/basetabs.py
+1
-0
No files found.
poezio/mam.py
View file @
e3c1ac40
...
...
@@ -141,21 +141,18 @@ async def query(tab, remote_jid, top, start=None, end=None, before=None):
def
mam_scroll
(
tab
):
remote_jid
=
tab
.
jid
text_buffer
=
tab
.
_text_buffer
try
:
before
=
tab
.
stanza_id
except
:
before
=
None
end
=
datetime
.
now
()
if
isinstance
(
tab
,
tabs
.
MucTab
)
is
False
:
for
message
in
text_buffer
.
messages
:
time
=
message
.
time
if
time
<
end
:
end
=
time
before
=
tab
.
stanza_id
end
=
datetime
.
now
()
if
isinstance
(
tab
,
tabs
.
MucTab
)
is
False
:
for
message
in
text_buffer
.
messages
:
time
=
message
.
time
if
time
<
end
:
end
=
time
end
=
end
+
timedelta
(
seconds
=-
1
)
tzone
=
datetime
.
now
().
astimezone
().
tzinfo
end
=
end
.
replace
(
tzinfo
=
tzone
).
astimezone
(
tz
=
timezone
.
utc
)
end
=
end
.
replace
(
tzinfo
=
None
)
end
=
datetime
.
strftime
(
end
,
'%Y-%m-%dT%H:%M:%SZ'
)
tzone
=
datetime
.
now
().
astimezone
().
tzinfo
end
=
end
.
replace
(
tzinfo
=
tzone
).
astimezone
(
tz
=
timezone
.
utc
)
end
=
end
.
replace
(
tzinfo
=
None
)
end
=
datetime
.
strftime
(
end
,
'%Y-%m-%dT%H:%M:%SZ'
)
top
=
True
pos
=
tab
.
text_win
.
pos
tab
.
text_win
.
pos
+=
tab
.
text_win
.
height
-
1
...
...
poezio/tabs/basetabs.py
View file @
e3c1ac40
...
...
@@ -475,6 +475,7 @@ class ChatTab(Tab):
assert
jid
.
domain
self
.
_jid
=
jid
self
.
query_id
=
0
self
.
stanza_id
=
None
self
.
_name
=
jid
.
full
# type: Optional[str]
self
.
text_win
=
None
...
...
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