From 45bb431bad8a1194e5ee1d37a0cf5dcdb7fb6ef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asiel=20D=C3=ADaz=20Ben=C3=ADtez?= Date: Mon, 27 Dec 2021 09:05:54 -0500 Subject: [PATCH] don't allow to add POI if user can't send in current chat, e.g. is not a member anymore (#2178) --- src/org/thoughtcrime/securesms/map/MapActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/map/MapActivity.java b/src/org/thoughtcrime/securesms/map/MapActivity.java index 85020774e..163fea86b 100644 --- a/src/org/thoughtcrime/securesms/map/MapActivity.java +++ b/src/org/thoughtcrime/securesms/map/MapActivity.java @@ -306,7 +306,7 @@ public class MapActivity extends BaseActivity implements Observer, } private boolean handleAddPoiClick(LatLng point) { - if (chatId == 0) { + if (chatId == 0 || !DcHelper.getContext(this).getChat(chatId).canSend()) { return false; }