Code Monkey home page Code Monkey logo

Comments (3)

michalwski avatar michalwski commented on August 17, 2024

Sorry for such a late response. Usually, regular XMPP clients sends initial presence to the server just after establishing the session and waits for the presence reply. This is what escalus_story tries to simulate in https://github.com/esl/escalus/blob/master/src/escalus_story.erl#L133-L134. You can set your own initial_activity if you don't want to send the initial presence.

from escalus.

pdorofiejczyk avatar pdorofiejczyk commented on August 17, 2024

It is ok that client sends initial presence. The wrong thing is that escalus waits ONLY for presence reply. It means that server should not send offline messages to client until it send presence reply first. I 'm using ejabberd server version 18.04 and default mod_offline, sends offline messages before presence reply. What's more this behaviour of escalus is not consistent with XEP-0160 (https://xmpp.org/extensions/xep-0160.html).

from escalus.

michalwski avatar michalwski commented on August 17, 2024

I see your point. You can change the way escalus_story behaves by providing other function to initial_activity by setting is in escalus_overrides. Sth like the following should work

[{escalus_overrides, 
  [{initial_activity, [{your_module, your_function}]}]} | Config]

In your function you can stop sending the initial presence, or send it but consume all the offline messages.

Please consult the escalus_overridables module for more details.

from escalus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.