Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    Presence spreed plugin auto unavailable not working (with solution)

    Kopano Meet & WebMeetings
    2
    5
    732
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • nbj
      nbj last edited by

      Hi,
      I’m running kopano-presence 8.6.80.743-0+84.1 and I had to change if int(time.time()) - info['last_update'] > self.limit*60: to if time.time() - info['last_update'] > int(self.limit)*60: in plugin_spreed.py for it to work.

      1 Reply Last reply Reply Quote 0
      • fbartels
        fbartels Kopano last edited by

        Hi @nbj ,

        I think I have seen that still working recently, Will see if I can reproduce your issue later this week.

        btw: still have your other post on my to do list.

        Regards Felix

        Resources:
        https://kopano.com/blog/how-to-get-kopano/
        https://documentation.kopano.io/
        https://kb.kopano.io/

        Support overview:
        https://kopano.com/support/

        1 Reply Last reply Reply Quote 0
        • fbartels
          fbartels Kopano last edited by

          Hi @nbj ,

          it took a while but I finally found some time to play around with this. For me logged in users to WebApp always stay available, regardless if you changes are applied or not. This only changes when the user closed the webapp window, then the code seems to kick in and set the user to unavailable.

          I’m not exactly sure about the intended behaviour here, will consult with a developer on this.

          Regards Felix

          Resources:
          https://kopano.com/blog/how-to-get-kopano/
          https://documentation.kopano.io/
          https://kb.kopano.io/

          Support overview:
          https://kopano.com/support/

          nbj 1 Reply Last reply Reply Quote 0
          • fbartels
            fbartels Kopano last edited by

            ok, hat a quick hat with a developer. So the intended workflow is as followed:

            • When a user has WebApp open. WebApp sends “I’m there” messages for the user to presence
            • that part in the code where you made your changes loops over all the states and checks which user has not sent his/her “I’m there” for a defined time (two minutes in the default configuration).
              -if a user did not check in then the following is logged:
            2018-05-31 14:03:23,650 - presence - INFO - spreed: auto unavailable
            2018-05-31 14:03:23,650 - presence - DEBUG - spreed: user1 unavailable
            

            And that indeed does work here fore me (without your changes applied).

            Are we talking about different things?

            Regards Felix

            Resources:
            https://kopano.com/blog/how-to-get-kopano/
            https://documentation.kopano.io/
            https://kb.kopano.io/

            Support overview:
            https://kopano.com/support/

            1 Reply Last reply Reply Quote 0
            • nbj
              nbj @fbartels last edited by nbj

              Hi @fbartels,
              What was happening to me was that when the user logged out webapp/closed browser window but didn’t logout from webmeetings (probably what a user will do every time) it stayed as online and never changed state to offline. With the proposed modification the user goes offline after 2 minutes if the server doesn’t received a status update in the meantime.

              I changed the cast to the int(self.limit)*60 because without it I was getting the self.limit repeated 60 (eg “2*60=2222222222222222222222222…”) times instead of a numerical result (“2*60=120”). This way int(time.time()) - info['last_update'] > self.limit*60: would never return true.

              For the record I’m running it in Ubuntu 16.04.4 with Python 2.7.12

              1 Reply Last reply Reply Quote 0
              • First post
                Last post