Mercurial > libervia-backend
comparison src/plugins/plugin_xep_0060.py @ 2484:785b6a1cef0a
plugin forums: first draft:
this plugin handle forums hierarchy, where forums link to topics which themselves link to blog nodes.
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 30 Jan 2018 08:17:08 +0100 |
parents | 0046283a285d |
children |
comparison
equal
deleted
inserted
replaced
2483:0046283a285d | 2484:785b6a1cef0a |
---|---|
146 | 146 |
147 used bridge's extra dictionnaries | 147 used bridge's extra dictionnaries |
148 @param extra(dict): extra data used to configure request | 148 @param extra(dict): extra data used to configure request |
149 @return(Extra): filled Extra instance | 149 @return(Extra): filled Extra instance |
150 """ | 150 """ |
151 if extra is not None: | 151 if extra is None: |
152 rsm_request = None | |
153 extra = {} | |
154 else: | |
152 # rsm | 155 # rsm |
153 rsm_args = {} | 156 rsm_args = {} |
154 for arg in ('max', 'after', 'before', 'index'): | 157 for arg in ('max', 'after', 'before', 'index'): |
155 try: | 158 try: |
156 argname = "max_" if arg == 'max' else arg | 159 argname = "max_" if arg == 'max' else arg |
187 extra_fields.append(data_form.Field(var=var, value=value)) | 190 extra_fields.append(data_form.Field(var=var, value=value)) |
188 | 191 |
189 if mam_args: | 192 if mam_args: |
190 assert 'mam' not in extra | 193 assert 'mam' not in extra |
191 extra['mam'] = mam.MAMRequest(mam.buildForm(**mam_args)) | 194 extra['mam'] = mam.MAMRequest(mam.buildForm(**mam_args)) |
192 else: | |
193 rsm_request = None | |
194 extra = {} | |
195 return Extra(rsm_request, extra) | 195 return Extra(rsm_request, extra) |
196 | 196 |
197 def addManagedNode(self, node, **kwargs): | 197 def addManagedNode(self, node, **kwargs): |
198 """Add a handler for a node | 198 """Add a handler for a node |
199 | 199 |