mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Merge pull request #2093 from deltachat/adb-issue-2092
accept contact request before replying from notification
This commit is contained in:
@@ -25,6 +25,8 @@ import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import androidx.core.app.RemoteInput;
|
||||
|
||||
import com.b44t.messenger.DcContext;
|
||||
|
||||
import org.thoughtcrime.securesms.connect.DcHelper;
|
||||
|
||||
|
||||
@@ -53,7 +55,11 @@ public class RemoteReplyReceiver extends BroadcastReceiver {
|
||||
new AsyncTask<Void, Void, Void>() {
|
||||
@Override
|
||||
protected Void doInBackground(Void... params) {
|
||||
DcHelper.getContext(context).sendTextMsg(chatId, responseText.toString());
|
||||
DcContext dcContext = DcHelper.getContext(context);
|
||||
if (dcContext.getChat(chatId).isContactRequest()) {
|
||||
dcContext.acceptChat(chatId);
|
||||
}
|
||||
dcContext.sendTextMsg(chatId, responseText.toString());
|
||||
DcHelper.getNotificationCenter(context).removeNotifications(chatId);
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user