Do not notify for reactions if not the group story sender.

This commit is contained in:
Alex Hart
2022-07-01 13:17:27 -03:00
committed by Greyson Parrelli
parent 6d24c342d2
commit bd5907ea04
3 changed files with 103 additions and 3 deletions

View File

@@ -885,7 +885,9 @@ public class MmsDatabase extends MessageDatabase {
public boolean hasSelfReplyInGroupStory(long parentStoryId) {
SQLiteDatabase db = databaseHelper.getSignalReadableDatabase();
String[] columns = new String[]{"COUNT(*)"};
String where = PARENT_STORY_ID + " = ? AND (" + getOutgoingTypeClause() + ")";
String where = PARENT_STORY_ID + " = ? AND (" +
getOutgoingTypeClause() + ") AND ("
+ MESSAGE_BOX + " & " + Types.SPECIAL_TYPES_MASK + " != " + Types.SPECIAL_TYPE_STORY_REACTION + ")";
String[] whereArgs = SqlUtil.buildArgs(parentStoryId);
try (Cursor cursor = db.query(TABLE_NAME, columns, where, whereArgs, null, null, null, null)) {