mirror of
https://codeberg.org/monocles/monocles_chat.git
synced 2025-01-15 22:22:22 +01:00
Include message id with spam report
If they didn't pick a specific message but report the whole chat as spam, most recent message is spam. (cherry picked from commit 8dea8085bcbdaadd869ca29e797e767f14666540)
This commit is contained in:
parent
b46c3b9de0
commit
8048e177bf
1 changed files with 7 additions and 1 deletions
|
@ -71,7 +71,13 @@ public final class BlockContactDialog {
|
|||
xmppActivity.xmppConnectionService.sendUnblockRequest(blockable);
|
||||
} else {
|
||||
boolean toastShown = false;
|
||||
if (xmppActivity.xmppConnectionService.sendBlockRequest(blockable, binding.reportSpam.isChecked(), serverMsgId)) {
|
||||
var finalServerId = serverMsgId;
|
||||
if (serverMsgId == null && binding.reportSpam.isChecked() && blockable instanceof Conversation) {
|
||||
final var lastM = ((Conversation) blockable).getLatestMessage();
|
||||
if (lastM != null) finalServerId = lastM.getServerMsgId();
|
||||
}
|
||||
|
||||
if (xmppActivity.xmppConnectionService.sendBlockRequest(blockable, binding.reportSpam.isChecked(), finalServerId)) {
|
||||
Toast.makeText(xmppActivity, R.string.corresponding_chats_closed, Toast.LENGTH_SHORT).show();
|
||||
toastShown = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue