Niklas, I *quickly* consulted the MUC XEP but cannot find the answer; however, here are some things that I would consider:
1) I would consider making this an "all or nothing" operation. For example, You could program the server to step through each element in the list to ensure that all of the change requests will succeed. As soon as you find an error, return that error to the client using the format described in XEP-0045 (do not commit any of the changes) and exit the operation. If all changes will succeed, then I would iterate through the list again and commit them all. 2) Alternatively, I would consider returning a separate IQ-error for each error encountered, and commit the rest. I suspect this could get ugly. Of course, I would have to carefully think about these 2 (and additional) options and bounce them off of other experts to make sure they are valid and effective. Maybe someone else on this list will respond with a better answer. Nick From: Niklas Gustavsson <[email protected]> To: Multi-User Chat over XMPP <[email protected]> Date: 08/06/2010 12:50 PM Subject: Re: [MUC] Batch updates and multiple errors On Fri, Aug 6, 2010 at 4:50 PM, Nicholas P Cipriano <[email protected]> wrote: > When the client receives the error list from the service, it should display each error to the user is a human-readable format or notify the user in some helpful way. For example, I imagine that multiple dialog boxes would cause a mess if there are many errors. Let us know if this answers your question. Not sure :-) Vysper is a server, so we should attempt to do the best thing for the different clients of course. Let's take the example from the spec: <iq from='[email protected]/globe' id='voice4' to='[email protected]' type='set'> <query xmlns='http://jabber.org/protocol/muc#admin'> <item nick='Hecate' role='visitor'/> <item nick='rosencrantz' role='participant'> <reason>A worthy fellow.</reason> </item> <item nick='guildenstern' role='participant'> <reason>A worthy fellow.</reason> </item> </query> </iq> Let's say the change for "Hecate" succeeds, the change for "rosencrantz" causes a "not-allowed" error and the change for "guildenstern" causes a "conflict" (for the sake of this example, this error might not be reasonable in this particular case). What stanza/stanzas should the server return? /niklas
