Add incoming message sources to active token dir.
This commit is contained in:
parent
1ac32346c1
commit
eb4cc7f4e5
1 changed files with 4 additions and 0 deletions
|
@ -9,6 +9,7 @@ import org.thoughtcrime.securesms.service.RegistrationService;
|
||||||
import org.thoughtcrime.securesms.service.SendReceiveService;
|
import org.thoughtcrime.securesms.service.SendReceiveService;
|
||||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||||
import org.whispersystems.textsecure.crypto.InvalidVersionException;
|
import org.whispersystems.textsecure.crypto.InvalidVersionException;
|
||||||
|
import org.whispersystems.textsecure.directory.Directory;
|
||||||
import org.whispersystems.textsecure.push.IncomingEncryptedPushMessage;
|
import org.whispersystems.textsecure.push.IncomingEncryptedPushMessage;
|
||||||
import org.whispersystems.textsecure.push.IncomingPushMessage;
|
import org.whispersystems.textsecure.push.IncomingPushMessage;
|
||||||
import org.whispersystems.textsecure.push.PushServiceSocket;
|
import org.whispersystems.textsecure.push.PushServiceSocket;
|
||||||
|
@ -62,6 +63,9 @@ public class GcmIntentService extends GCMBaseIntentService {
|
||||||
service.setAction(SendReceiveService.RECEIVE_PUSH_ACTION);
|
service.setAction(SendReceiveService.RECEIVE_PUSH_ACTION);
|
||||||
service.putExtra("message", message);
|
service.putExtra("message", message);
|
||||||
|
|
||||||
|
Directory directory = Directory.getInstance(context);
|
||||||
|
directory.setToken(directory.getToken(message.getSource()), true);
|
||||||
|
|
||||||
context.startService(service);
|
context.startService(service);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Log.w("GcmIntentService", e);
|
Log.w("GcmIntentService", e);
|
||||||
|
|
Loading…
Add table
Reference in a new issue