Hello Bernhard,
On Sat, 11 Jul 2009 13:34:26 +0200, Bernhard zwischenbrugger
<[email protected]> wrote:
> The thing I wanted to do, is to store all "normal" messages without
> "type" attribute and then
> retrieve a list of these messages.
>
> My idea is to make a webchat that handles "normal" messages like emails
> in a mail program - similar to IMAP.
In my opinion this kind of thinking is not well-supported in XEP-136 indeed
as it was built for slightly different task: it's not designed as IMAP
(meaning Instant Message Access Protocol ;-) - XEP-136 is just the way to
store some messages which IM clients handled already for the purposes of
reviewing them later, it doesn't really give you enough power to manage
them in "fancy" ways or do some advanced filtering.
> But all the things I need for that I couldn't find in xep-136.
> No possibility to store only normal messsages.
That depends on what do you mean by "store".
If you mean "manual" archiving you can store whatever messages you want
based on your own criteria, including "store only normal messages" or
whatever.
If you'd like automatic archiving on server to store only "normal" messages
but not groupchats - the easiest way would be to disable auto-archiving for
the whole MUC domain in archiving preferences (as typically groupchats are
hosted on separate domain anyway).
If you'd like automatic archiving on server to store only "normal" messages
but not anything else ("headline", "chat", etc) - you're indeed out of
options with current version of spec, it seems, so you either should use
manual archiving - or insist on extending spec to include the way to
specify types of messages to be stored in preferences.
However, while I do not know exactly your usage scenarios, it seems strange
for me that you're talking about "storing" here but not "filtering" - for
me it seems that it's server users business to decide on what they'd like
to store, and that's "mail program - similar to IMAP" business to filter
out from all stored messages those that it is able to handle, so I'd expect
you need some way to retrieve from all stored messages only messages with
given type ...
> No way to retrieve for example the last 20 messages.
Just use RSM (see XEP-59) and you'll be fine, that's quite powerful beast
;-)
--
Good luck! Alexander