Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow unblocking mailinglists using the existing api #2259

Merged
merged 4 commits into from Feb 23, 2021
Merged

Conversation

r10s
Copy link
Member

@r10s r10s commented Feb 22, 2021

for review: only the last commit contains the logic (only one file affected), the other commits are cleanup, a fix and a test. some in advance:

to get #1964 in, we postponed the question about unblocking mailing lists - on current master, they can be blocked but there is no method to unblock them.

this pr picks up the original idea and keeps the existing api (therefore, no adaption is needed in ui, see comment 3. at 3c0d1a5).

however, instead of introducing a "pseudo contact" that is always added to the mailing list, we add such a contact only if the mailing list is actually blocked and if the blocked-list is requested. Origin::MailinglistAddress makes sure, the contact is not created through other channels.

in the usual Mailinglist processing, the special contact is not needed and is not assigned eg. as a "member". that preserves the option to do sth. else with the member list, eg. show recent senders there, if we want to.

if we decide to go for another unblock api someday, this is easily possible by just doing a "DELETE FROM contacts WHERE origin=MailinglistAddress", same if we need to tweak the current approach.

however, for now, i think the big advantage is that the api stays unchanged and no adaptions in the UI are needed for this bit (that is not even used in most of the cases).
also, i am not sure that a "block chat", as discussed here and there, is really superior over "block contact" - and to have both is maybe a bit much ux wise - esp. for mailing lists, where the user does not see a big difference imho. for all of these reasons, i like to postpone the discussion wrt another unblock api :)

@r10s r10s added this to In progress in improve e-mail compatibility via automation Feb 23, 2021
@r10s r10s requested review from link2xt and Hocuri February 23, 2021 11:13
src/contact.rs Show resolved Hide resolved
src/contact.rs Show resolved Hide resolved
@r10s r10s force-pushed the unblock-ml branch 2 times, most recently from f0a698f to 5bfcbcb Compare February 23, 2021 16:21
blocked mailinglists addresses are added to the contact table
before blocked contact list is created -
(this allows unblocking of blocked lists in previous testing releases,
however, more importantly, it keeps all blocking/unblocking code inside
contacts)

on unblocking such a contact,
the corresponding chat is unblocked as well.
@r10s r10s merged commit f973b75 into master Feb 23, 2021
improve e-mail compatibility automation moved this from In progress to Done Feb 23, 2021
@r10s r10s deleted the unblock-ml branch February 23, 2021 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants