Skip to content
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

[ Roster] How can I manipulate user roster ? #132

Open
hamdijmii1992 opened this issue Dec 14, 2016 · 0 comments
Open

[ Roster] How can I manipulate user roster ? #132

hamdijmii1992 opened this issue Dec 14, 2016 · 0 comments

Comments

@hamdijmii1992
Copy link

I tried to manipulate user roster with escalus API.
After diving a little bit in Escalus code I found some functions that have relations with my need like:

escalus_pred:roster_contains
escalus_pred:count_roster_items
escalus_pred:get_roster_items
escalus_stanza:roster_get
escalus_stanza:roster_add_contact

I tried for example to use one of them to count roster item as follows:

escalus_pred:count_roster_items(0,{xmlel,<<"iq">>,[{<<"type">>,<<"get">>},{<<"id">>,<<"230c60e893af03efbcf2fed3b8cdd585">>}],[{xmlel,<<"query">>,[{<<"from">>,<<"carol@localhost">>},{<<"xmlns">>,<<"jabber:iq:roster">>}],[]}]}).

I have a doubt if my stanza element is well formatted, also I have another question about getting roster items, Should I use escalus_pred:get_roster_items ?

@hamdijmii1992 hamdijmii1992 changed the title [ Roster] How can manipulate user roster ? [ Roster] How I can manipulate user roster ? Dec 14, 2016
@hamdijmii1992 hamdijmii1992 changed the title [ Roster] How I can manipulate user roster ? [ Roster] How can I manipulate user roster ? Dec 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant