Proactively share profile key after accepting a message request.

This commit is contained in:
Alex Hart
2020-04-16 09:30:46 -03:00
committed by Greyson Parrelli
parent fc6b5c1d7c
commit 6d6e017c71
4 changed files with 171 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ import android.os.Parcelable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.WorkerThread;
import com.annimon.stream.Stream;
@@ -52,6 +53,7 @@ import org.thoughtcrime.securesms.jobs.AttachmentCopyJob;
import org.thoughtcrime.securesms.jobs.AttachmentMarkUploadedJob;
import org.thoughtcrime.securesms.jobs.AttachmentUploadJob;
import org.thoughtcrime.securesms.jobs.MmsSendJob;
import org.thoughtcrime.securesms.jobs.ProfileKeySendJob;
import org.thoughtcrime.securesms.jobs.PushGroupSendJob;
import org.thoughtcrime.securesms.jobs.PushMediaSendJob;
import org.thoughtcrime.securesms.jobs.PushTextSendJob;
@@ -80,6 +82,11 @@ public class MessageSender {
private static final String TAG = MessageSender.class.getSimpleName();
@WorkerThread
public static void sendProfileKey(final Context context, final long threadId) {
ApplicationDependencies.getJobManager().add(ProfileKeySendJob.create(context, threadId));
}
public static long send(final Context context,
final OutgoingTextMessage message,
final long threadId,