@ -28,10 +28,13 @@ import android.support.v4.app.RemoteInput;
import org.thoughtcrime.securesms.database.Address ;
import org.thoughtcrime.securesms.database.Address ;
import org.thoughtcrime.securesms.database.DatabaseFactory ;
import org.thoughtcrime.securesms.database.DatabaseFactory ;
import org.thoughtcrime.securesms.database.MessagingDatabase.MarkedMessageInfo ;
import org.thoughtcrime.securesms.database.MessagingDatabase.MarkedMessageInfo ;
import org.thoughtcrime.securesms.database.RecipientDatabase ;
import org.thoughtcrime.securesms.mms.OutgoingMediaMessage ;
import org.thoughtcrime.securesms.mms.OutgoingMediaMessage ;
import org.thoughtcrime.securesms.recipients.Recipient ;
import org.thoughtcrime.securesms.recipients.Recipient ;
import org.thoughtcrime.securesms.sms.MessageSender ;
import org.thoughtcrime.securesms.sms.MessageSender ;
import org.thoughtcrime.securesms.sms.OutgoingEncryptedMessage ;
import org.thoughtcrime.securesms.sms.OutgoingTextMessage ;
import org.thoughtcrime.securesms.sms.OutgoingTextMessage ;
import org.thoughtcrime.securesms.util.TextSecurePreferences ;
import java.util.Collections ;
import java.util.Collections ;
import java.util.LinkedList ;
import java.util.LinkedList ;
@ -71,6 +74,9 @@ public class RemoteReplyReceiver extends BroadcastReceiver {
if ( recipient . isGroupRecipient ( ) ) {
if ( recipient . isGroupRecipient ( ) ) {
OutgoingMediaMessage reply = new OutgoingMediaMessage ( recipient , responseText . toString ( ) , new LinkedList < > ( ) , System . currentTimeMillis ( ) , subscriptionId , expiresIn , 0 , null , Collections . emptyList ( ) ) ;
OutgoingMediaMessage reply = new OutgoingMediaMessage ( recipient , responseText . toString ( ) , new LinkedList < > ( ) , System . currentTimeMillis ( ) , subscriptionId , expiresIn , 0 , null , Collections . emptyList ( ) ) ;
threadId = MessageSender . send ( context , reply , - 1 , false , null ) ;
threadId = MessageSender . send ( context , reply , - 1 , false , null ) ;
} else if ( TextSecurePreferences . isPushRegistered ( context ) & & recipient . getRegistered ( ) = = RecipientDatabase . RegisteredState . REGISTERED ) {
OutgoingEncryptedMessage reply = new OutgoingEncryptedMessage ( recipient , responseText . toString ( ) , expiresIn ) ;
threadId = MessageSender . send ( context , reply , - 1 , false , null ) ;
} else {
} else {
OutgoingTextMessage reply = new OutgoingTextMessage ( recipient , responseText . toString ( ) , expiresIn , subscriptionId ) ;
OutgoingTextMessage reply = new OutgoingTextMessage ( recipient , responseText . toString ( ) , expiresIn , subscriptionId ) ;
threadId = MessageSender . send ( context , reply , - 1 , false , null ) ;
threadId = MessageSender . send ( context , reply , - 1 , false , null ) ;