summaryrefslogtreecommitdiff
path: root/poezio/tabs
diff options
context:
space:
mode:
authorMadhur Garg <madhurgarg96@gmail.com>2019-07-19 23:34:46 +0530
committerMadhur Garg <madhurgarg96@gmail.com>2019-08-22 00:54:25 +0530
commit7ea48f4cdca57cda89121ab07eae39848ebebc60 (patch)
tree9214164430fba93f874a50072ac915c3d2ca75d7 /poezio/tabs
parent8b4cc9128572404d642e7ea6744e61939e91c66d (diff)
downloadpoezio-7ea48f4cdca57cda89121ab07eae39848ebebc60.tar.gz
poezio-7ea48f4cdca57cda89121ab07eae39848ebebc60.tar.bz2
poezio-7ea48f4cdca57cda89121ab07eae39848ebebc60.tar.xz
poezio-7ea48f4cdca57cda89121ab07eae39848ebebc60.zip
Removed /mam command as it is implemented in mam_tab (WIP:37)
Diffstat (limited to 'poezio/tabs')
-rw-r--r--poezio/tabs/basetabs.py33
1 files changed, 0 insertions, 33 deletions
diff --git a/poezio/tabs/basetabs.py b/poezio/tabs/basetabs.py
index ccd3a9d0..9ee71070 100644
--- a/poezio/tabs/basetabs.py
+++ b/poezio/tabs/basetabs.py
@@ -501,11 +501,6 @@ class ChatTab(Tab):
self.command_scrollback,
usage="end home clear status goto <+|-linecount>|<linenum>|<timestamp>",
shortdesc='Scrollback to the given line number, message, or clear the buffer.')
- self.register_command(
- 'mam',
- self.command_mam,
- usage="[start_timestamp [end_timestamp]]",
- shortdesc='Query an archive of messages using MAM.')
self.commands['sb'] = self.commands['scrollback']
self.register_command(
'xhtml',
@@ -925,34 +920,6 @@ class ChatTab(Tab):
# new_date is the timestamp for which the user has queried.
self.goto_build_lines(new_date)
- @command_args_parser.quoted(0, 2)
- def command_mam(self, args):
- """
- Query an archive of messages using MAM.
- /mam [start_timestamp [end_timestamp]]
- """
-
- remote_jid = self.jid
- top = False
- end = datetime.now()
- end = datetime.strftime(end, '%Y-%m-%dT%H:%M:%SZ')
- start = datetime.strptime(end, '%Y-%m-%dT%H:%M:%SZ')
- # Default start date is 10 days past the current day.
- start = start + timedelta(days=-10)
- start = datetime.strftime(start, '%Y-%m-%dT%H:%M:%SZ')
- # Format for start and end timestamp is [dd:mm:yyyy]
- if len(args) >= 1:
- try:
- start = datetime.strptime(args[0], '%d:%m:%Y')
- start = datetime.strftime(start, '%Y-%m-%dT%H:%M:%SZ')
- if len(args) == 2:
- end = datetime.strptime(args[1], '%d:%m:%Y')
- end = datetime.strftime(end, '%Y-%m-%dT%H:%M:%SZ')
- except ValueError:
- self.core.information("Please enter a valid JID in [dd:mm:yyyy] format.", "Error")
-
- asyncio.ensure_future(mam.query(self, remote_jid, start, end, top))
-
def on_line_up(self):
return self.text_win.scroll_up(1)