Discussion:
[ejabberd] mod_rest error on presence update
David Cunningham
2018-02-14 23:38:40 UTC
Permalink
Hello,

We used to successfully (on version 16 I think) send the following XML to
mod_rest to set a user's presence status:

<presence to="***@example.com"
from="***@example.com"><show>dnd</show><status>On
the phone</status></presence>

However now with ejabberd versions 17 and 18 we get this error back:

2018-02-14 15:33:47.158 [debug] <0.492.0>@mod_rest:maybe_post_request:83
Error when processing REST request:
Data: <<"<presence to=\"***@example.com\"
from=\"***@example.com\"><show>dnd</show><status>On
the phone</status></presence>">>
Error: {badrecord,message}

Does anyone know why this error occurs? Thank you in advance.
--
David Cunningham, Voisonics Limited
http://voisonics.com/
USA: +1 213 221 1092
New Zealand: +64 (0)28 2558 3782
Evgeny Khramtsov
2018-02-15 06:28:26 UTC
Permalink
Thu, 15 Feb 2018 12:38:40 +1300
Post by David Cunningham
Hello,
We used to successfully (on version 16 I think) send the following
the phone</status></presence>
2018-02-14 15:33:47.158 [debug]
the phone</status></presence>">>
Error: {badrecord,message}
Does anyone know why this error occurs? Thank you in advance.
Probably nobody ported mod_rest to the new ejabberd API.
David Cunningham
2018-02-15 08:43:32 UTC
Permalink
Hi Evgeny,

Thanks for the reply. What's the best way to set a user's presence status
from the server side without using mod_rest then?
Post by Evgeny Khramtsov
Thu, 15 Feb 2018 12:38:40 +1300
Post by David Cunningham
Hello,
We used to successfully (on version 16 I think) send the following
the phone</status></presence>
2018-02-14 15:33:47.158 [debug]
the phone</status></presence>">>
Error: {badrecord,message}
Does anyone know why this error occurs? Thank you in advance.
Probably nobody ported mod_rest to the new ejabberd API.
_______________________________________________
ejabberd mailing list
http://lists.jabber.ru/mailman/listinfo/ejabberd
--
David Cunningham, Voisonics Limited
http://voisonics.com/
USA: +1 213 221 1092
New Zealand: +64 (0)28 2558 3782
Badlop
2018-02-15 16:09:28 UTC
Permalink
Hi,

When mod_rest was updated to the new ejabberd API, it got restricted
to support only message stanzas.
The fix is easy. Try the new git code, and report if there's any other
problem with that module, now that you're trying it.
Thanks!

--
Badlop
ProcessOne

On 15 February 2018 at 00:38, David Cunningham
Post by David Cunningham
Hello,
We used to successfully (on version 16 I think) send the following XML to
phone</status></presence>
phone</status></presence>">>
Error: {badrecord,message}
Does anyone know why this error occurs? Thank you in advance.
--
David Cunningham, Voisonics Limited
http://voisonics.com/
USA: +1 213 221 1092
New Zealand: +64 (0)28 2558 3782
_______________________________________________
ejabberd mailing list
http://lists.jabber.ru/mailman/listinfo/ejabberd
David Cunningham
2018-02-15 22:56:48 UTC
Permalink
Hi Badlop,

Thanks for that. I updated the module as follows and it's working!

ejabberdctl modules_update_specs
ejabberdctl module_uninstall mod_rest
ejabberdctl module_install mod_rest
Post by Badlop
Hi,
When mod_rest was updated to the new ejabberd API, it got restricted
to support only message stanzas.
The fix is easy. Try the new git code, and report if there's any other
problem with that module, now that you're trying it.
Thanks!
--
Badlop
ProcessOne
On 15 February 2018 at 00:38, David Cunningham
Post by David Cunningham
Hello,
We used to successfully (on version 16 I think) send the following XML to
phone</status></presence>
phone</status></presence>">>
Error: {badrecord,message}
Does anyone know why this error occurs? Thank you in advance.
--
David Cunningham, Voisonics Limited
http://voisonics.com/
USA: +1 213 221 1092
New Zealand: +64 (0)28 2558 3782
_______________________________________________
ejabberd mailing list
http://lists.jabber.ru/mailman/listinfo/ejabberd
_______________________________________________
ejabberd mailing list
http://lists.jabber.ru/mailman/listinfo/ejabberd
--
David Cunningham, Voisonics Limited
http://voisonics.com/
USA: +1 213 221 1092
New Zealand: +64 (0)28 2558 3782
Loading...