diff --git a/src/status_im/communities/core.cljs b/src/status_im/communities/core.cljs index a0bd1c1f3f..32c35105a8 100644 --- a/src/status_im/communities/core.cljs +++ b/src/status_im/communities/core.cljs @@ -558,16 +558,20 @@ (rf/defn request-to-join-accepted {:events [::request-to-join-accepted]} [{:keys [db] :as cofx} community-id request-id response-js] - (rf/merge cofx - {:db (update-in db [:communities/requests-to-join community-id] dissoc request-id)} - (handle-response response-js))) + (rf/merge + cofx + {:db (update-in db [:communities/requests-to-join community-id] dissoc request-id) + :dispatch-n [[:sanitize-messages-and-process-response response-js] + [:activity-center.notifications/mark-as-read request-id]]})) (rf/defn request-to-join-declined {:events [::request-to-join-declined]} [{:keys [db] :as cofx} community-id request-id response-js] - (rf/merge cofx - {:db (update-in db [:communities/requests-to-join community-id] dissoc request-id)} - (handle-response response-js))) + (rf/merge + cofx + {:db (update-in db [:communities/requests-to-join community-id] dissoc request-id) + :dispatch-n [[:sanitize-messages-and-process-response response-js] + [:activity-center.notifications/mark-as-read request-id]]})) (rf/defn accept-request-to-join-pressed {:events [:communities.ui/accept-request-to-join-pressed]} diff --git a/src/status_im2/contexts/activity_center/notification/admin/view.cljs b/src/status_im2/contexts/activity_center/notification/admin/view.cljs index 89b955c273..e7cef35332 100644 --- a/src/status_im2/contexts/activity_center/notification/admin/view.cljs +++ b/src/status_im2/contexts/activity_center/notification/admin/view.cljs @@ -41,15 +41,11 @@ :type :danger :on-press (fn [] (rf/dispatch [:communities.ui/decline-request-to-join-pressed - community-id id]) - (rf/dispatch [:activity-center.notifications/mark-as-read - id]))} + community-id id]))} :button-2 {:label (i18n/label :t/accept) :accessibility-label :accept-join-request :type :positive :on-press (fn [] (rf/dispatch [:communities.ui/accept-request-to-join-pressed - community-id id]) - (rf/dispatch [:activity-center.notifications/mark-as-read - id]))}} + community-id id]))}} nil))]))