mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
pusher: sync user when reconnecting
This commit is contained in:
@@ -63,6 +63,9 @@ angular.module('habitrpg')
|
|||||||
|
|
||||||
// When the user correctly enters the party channel
|
// When the user correctly enters the party channel
|
||||||
partyChannel.bind('pusher:subscription_succeeded', function(pusherMembers) {
|
partyChannel.bind('pusher:subscription_succeeded', function(pusherMembers) {
|
||||||
|
// Sync the user if we're reconnecting
|
||||||
|
if (reconnecting) $rootScope.User.sync();
|
||||||
|
|
||||||
// Wait for the party to be loaded
|
// Wait for the party to be loaded
|
||||||
Groups.party(reconnecting).then(function (party) {
|
Groups.party(reconnecting).then(function (party) {
|
||||||
// If we just reconnected after some inactivity, sync the party
|
// If we just reconnected after some inactivity, sync the party
|
||||||
|
|||||||
Reference in New Issue
Block a user