* WIP
* Investigation in progress
* End of day push
* WIP
* Fixes#1416
* Cleanup
* Added code to remove zombie messages caught in limbo during a ban & delete - still chock full o' debug while finding root cause
* Root cause debug WIP
* Push prior to cleanup
* Cleaned up for PR
* fix: mms delete, remove unnecessary values from sms
* Addressed PR feedback
* fix: fix unit tests
* Added '.run' folder with test setup
* Update README.md
Test commit for CI
* Re-added accidentally removed closing brace
---------
Co-authored-by: alansley <aclansley@gmail.com>
Co-authored-by: Al Lansley <alansley@users.noreply.github.com>
Co-authored-by: 0x330a <92654767+0x330a@users.noreply.github.com>
text("This will ban the selected user from this room and delete all messages sent by them. It won't ban them from other rooms or delete the messages they sent there.")
return"UPDATE "+TABLE_NAME+" SET "+APPROVED+" = 1, "+APPROVED_ME+" = 1 "+
"WHERE "+ADDRESS+" NOT LIKE '"+OPEN_GROUP_PREFIX+"%' "+
"WHERE "+ADDRESS+" NOT LIKE '"+COMMUNITY_PREFIX+"%' "+
"AND ("+ADDRESS+" IN (SELECT "+ThreadDatabase.TABLE_NAME+"."+ThreadDatabase.ADDRESS+" FROM "+ThreadDatabase.TABLE_NAME+" WHERE ("+ThreadDatabase.MESSAGE_COUNT+" != 0) "+
"OR "+ADDRESS+" IN (SELECT "+GroupDatabase.TABLE_NAME+"."+GroupDatabase.ADMINS+" FROM "+GroupDatabase.TABLE_NAME+")))";
@ -491,7 +491,7 @@ public class ThreadDatabase extends Database {
}
publicCursorgetConversationList(){
Stringwhere="("+MESSAGE_COUNT+" != 0 OR "+GroupDatabase.TABLE_NAME+"."+GROUP_ID+" LIKE '"+OPEN_GROUP_PREFIX +"%') "+
Stringwhere="("+MESSAGE_COUNT+" != 0 OR "+GroupDatabase.TABLE_NAME+"."+GROUP_ID+" LIKE '"+COMMUNITY_PREFIX +"%') "+
"AND "+ARCHIVED+" = 0 ";
returngetConversationList(where);
}
@ -502,7 +502,7 @@ public class ThreadDatabase extends Database {
}
publicCursorgetApprovedConversationList(){
Stringwhere="(("+HAS_SENT+" = 1 OR "+RecipientDatabase.APPROVED+" = 1 OR "+GroupDatabase.TABLE_NAME+"."+GROUP_ID+" LIKE '"+CLOSED_GROUP_PREFIX+"%') OR "+GroupDatabase.TABLE_NAME+"."+GROUP_ID+" LIKE '"+OPEN_GROUP_PREFIX +"%') "+
Stringwhere="(("+HAS_SENT+" = 1 OR "+RecipientDatabase.APPROVED+" = 1 OR "+GroupDatabase.TABLE_NAME+"."+GROUP_ID+" LIKE '"+CLOSED_GROUP_PREFIX+"%') OR "+GroupDatabase.TABLE_NAME+"."+GROUP_ID+" LIKE '"+COMMUNITY_PREFIX +"%') "+
"AND "+ARCHIVED+" = 0 ";
returngetConversationList(where);
}
@ -516,7 +516,7 @@ public class ThreadDatabase extends Database {
}
publicCursorgetArchivedConversationList(){
Stringwhere="("+MESSAGE_COUNT+" != 0 OR "+GroupDatabase.TABLE_NAME+"."+GROUP_ID+" LIKE '"+OPEN_GROUP_PREFIX +"%') "+
Stringwhere="("+MESSAGE_COUNT+" != 0 OR "+GroupDatabase.TABLE_NAME+"."+GROUP_ID+" LIKE '"+COMMUNITY_PREFIX +"%') "+
"AND "+ARCHIVED+" = 1 ";
returngetConversationList(where);
}
@ -526,7 +526,7 @@ public class ThreadDatabase extends Database {
Stringquery=createQuery(where,0);
Cursorcursor=db.rawQuery(query,null);
setNotifyConverationListListeners(cursor);
setNotifyConversationListListeners(cursor);
returncursor;
}
@ -547,7 +547,7 @@ public class ThreadDatabase extends Database {
// edge case where we set the last seen time for a conversation before it loads messages (joining community for example)