New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XEP-0313 MAM support. #21
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job. I hope a maintainer will look at it.
@@ -49,6 +50,12 @@ Default is nil, cause MUC logging may be i/o-intensive." | |||
:type 'boolean | |||
:group 'jabber-history) | |||
|
|||
(defcustom jabber-history-mam nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't that be a per-account option instead?
(nreverse jabber-mam-results)) | ||
|
||
(provide 'jabber-mam) | ||
;;; jabber-mam.el ends here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functions in these files are quite long. Your code would gain readability if some smaller functions were extracted from the large ones.
Prevent hang on error.
Hi, thanks for the review.
DamienCassou commented on this pull request.
+(defcustom jabber-history-mam nil
shouldn't that be a per-account option instead?
The current scope follows that of the `jabber-history-enabled' option.
Would it make sense to keep both options with the same scope in this
pull request, and possibly make the options account-specific at a later
time? I'd rather isolate the MAM implementation from other
improvements, if that makes sense.
That being said, the code would hang when MAM is enabled but not
supported by a server, so I have implemented a tentative fix for that.
Functions in these files are quite long. Your code would gain readability if some smaller functions were extracted from the large ones.
I updated the code, splitting functions into smaller components. I hope
it improves readability.
|
This is an attempt at implementing support for XEP-0313 Message Archive Management (http://xmpp.org/extensions/xep-0313.html).
I am testing this with a prosody server (Prosody trunk nightly build 732 (2016-12-19, 8efd51667622)) and mercurial prosody-modules (https://hg.prosody.im/prosody-modules/ changeset 2462:81127dcdb326).
It would be useful if people could test this and report.