comparison sat_frontends/jp/cmd_message.py @ 2764:92af49cde255

jp (base): MAM and RSM arguments can now be used for pubsub commands: - RSM and MAM args arguments have been added to pubsub group, and activated when multiple items are possible - /!\ --max-items (i.e. pubsub original max) short option has been change for -M, and -m is now used for RSM max - pubsub/search -m option has been renamed -M for same reason as above - pubsub/search -o option has been replaced by -k (for keep), to avoid conflict with order-by (and long version is now --node-max)
author Goffi <goffi@goffi.org>
date Fri, 11 Jan 2019 10:18:02 +0100
parents 8fd8ce5a5855
children 003b8b4b56a7
comparison
equal deleted inserted replaced
2763:c4190d5340ab 2764:92af49cde255
220 help=_(u"end fetching archive after this date (default: no limit)")) 220 help=_(u"end fetching archive after this date (default: no limit)"))
221 self.parser.add_argument( 221 self.parser.add_argument(
222 "-W", "--with", dest="mam_with", type=base.unicode_decoder, 222 "-W", "--with", dest="mam_with", type=base.unicode_decoder,
223 help=_(u"retrieve only archives with this jid")) 223 help=_(u"retrieve only archives with this jid"))
224 self.parser.add_argument( 224 self.parser.add_argument(
225 "-M", "--max", dest="rsm_max", type=int, default=20, 225 "-m", "--max", dest="rsm_max", type=int, default=20,
226 help=_(u"maximum number of items to retrieve, using RSM (default: 20))")) 226 help=_(u"maximum number of items to retrieve, using RSM (default: 20))"))
227 227
228 def _sessionInfosGetCb(self, session_info, data, metadata): 228 def _sessionInfosGetCb(self, session_info, data, metadata):
229 self.host.own_jid = jid.JID(session_info[u"jid"]) 229 self.host.own_jid = jid.JID(session_info[u"jid"])
230 self.output(data) 230 self.output(data)