Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-1499

Chat auto reconnect and improve delay with sending messages

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.0.0
    • Component/s: Chat add-on
    • Labels:
    • Testing Instructions:
      Hide

      Test auto-reconnect

      To test this you'll probably have to use an old site since I didn't disconnect using master version. I used a Moodle 2.6 with local_mobile to test this.

      1. Connect to a chat in Mobile as a user.
      2. Go offline.
      3. In Moodle web, login as another user and open the chat too. Send a message and wait for the Mobile user to disconnect (not shown in the connected users).
      4. Now go online with the app. Check that you're reconnected and you receive the message sent while you were offline.

      Test send message delay

      1. Send messages using the app and check that you can see the sent message almost immediately after sending it (there was a 0-5 seconds delay before).

      Test reconnect

      1. Connect to a chat using the app.
      2. Simulate a server down. You can turn off your server, disconnect your router from Internet, change the WS code to make it fail, ...
      3. Check that a Reconnect button is shown in the app. Check that an error message is shown if you click reconnect while the server is still down.
      4. Make the server work again and click Reconnect. Check that you receive messages again.
      Show
      Test auto-reconnect To test this you'll probably have to use an old site since I didn't disconnect using master version. I used a Moodle 2.6 with local_mobile to test this. Connect to a chat in Mobile as a user. Go offline. In Moodle web, login as another user and open the chat too. Send a message and wait for the Mobile user to disconnect (not shown in the connected users). Now go online with the app. Check that you're reconnected and you receive the message sent while you were offline. Test send message delay Send messages using the app and check that you can see the sent message almost immediately after sending it (there was a 0-5 seconds delay before). Test reconnect Connect to a chat using the app. Simulate a server down. You can turn off your server, disconnect your router from Internet, change the WS code to make it fail, ... Check that a Reconnect button is shown in the app. Check that an error message is shown if you click reconnect while the server is still down. Make the server work again and click Reconnect. Check that you receive messages again.
    • Affected Branches:
      MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE

      Description

      If a user is offline for a while in a chat, he's disconnected. We should try to automatically reconnect him to the chat room.

      Also, when a user sends a message there's a delay until he's able to see that message. We should try to avoid that like we do with messages.

      Finally, if the polling of messages fails because the server is down or something like that, right now the user has to leave the room and enter it again to start the polling again. We should have a reconnect button.

        Attachments

          Activity

            People

            • Assignee:
              dpalou Dani Palou
              Reporter:
              dpalou Dani Palou
              Peer reviewer:
              Pau Ferrer
              Integrator:
              Juan Leyva
              Participants:
              Component watchers:
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/Apr/16