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
203
Issues
203
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
8e07c6d6
Commit
8e07c6d6
authored
Jul 09, 2019
by
Madhur Garg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added messages when the query is starting and ending.
parent
3e491589
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
poezio/mam.py
poezio/mam.py
+9
-2
No files found.
poezio/mam.py
View file @
8e07c6d6
...
...
@@ -16,8 +16,11 @@ def add_line(text_buffer: TextBuffer, text: str, str_time: str, nick: str, top:
time
=
datetime
.
strftime
(
str_time
,
'%Y-%m-%d %H:%M:%S'
)
time
=
datetime
.
strptime
(
time
,
'%Y-%m-%d %H:%M:%S'
)
nick
=
nick
.
split
(
'/'
)[
1
]
color
=
get_theme
().
COLOR_OWN_NICK
if
'/'
in
nick
:
nick
=
nick
.
split
(
'/'
)[
1
]
color
=
get_theme
().
COLOR_OWN_NICK
else
:
color
=
get_theme
().
COLOR_ME_MESSAGE
top
=
top
text_buffer
.
add_message
(
text
,
...
...
@@ -42,6 +45,8 @@ async def query(self, remote_jid, start, end, top):
iterator
=
True
,
reverse
=
top
,
start
=
self
.
start_date
,
end
=
self
.
end_date
)
msg_count
=
0
msgs
=
[]
timestamp
=
datetime
.
now
()
add_line
(
text_buffer
,
'Start of MAM query: '
,
timestamp
,
'MAM'
,
top
)
async
for
rsm
in
results
:
if
top
:
for
msg
in
rsm
[
'mam'
][
'results'
]:
...
...
@@ -64,6 +69,8 @@ async def query(self, remote_jid, start, end, top):
message
=
forwarded
[
'stanza'
]
add_line
(
text_buffer
,
message
[
'body'
],
timestamp
,
str
(
message
[
'from'
]),
top
)
self
.
core
.
refresh_window
()
timestamp
=
datetime
.
now
()
add_line
(
text_buffer
,
'End of MAM query: '
,
timestamp
,
'MAM'
,
top
)
def
mam_scroll
(
self
):
...
...
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