Add incoming message sources to active token dir.

pull/1/head
Moxie Marlinspike 11 years ago
parent 1ac32346c1
commit eb4cc7f4e5

@ -9,6 +9,7 @@ import org.thoughtcrime.securesms.service.RegistrationService;
import org.thoughtcrime.securesms.service.SendReceiveService;
import org.thoughtcrime.securesms.util.TextSecurePreferences;
import org.whispersystems.textsecure.crypto.InvalidVersionException;
import org.whispersystems.textsecure.directory.Directory;
import org.whispersystems.textsecure.push.IncomingEncryptedPushMessage;
import org.whispersystems.textsecure.push.IncomingPushMessage;
import org.whispersystems.textsecure.push.PushServiceSocket;
@ -62,6 +63,9 @@ public class GcmIntentService extends GCMBaseIntentService {
service.setAction(SendReceiveService.RECEIVE_PUSH_ACTION);
service.putExtra("message", message);
Directory directory = Directory.getInstance(context);
directory.setToken(directory.getToken(message.getSource()), true);
context.startService(service);
} catch (IOException e) {
Log.w("GcmIntentService", e);

Loading…
Cancel
Save