I noticed that my subscriptions have duplicate entries in them -- for wdavison: https://sourceforge.net/auth/prefs/
For instance, I create a ticket, then comment on the ticket, and the comment produces a duplicate subscription. Comment again, get yet another subscription.
I couldn't duplicate the original issue but the added logic looks right.
It could be a bit cleaner by putting artifact_already_subscribed lines in the existing "if artifact is None" else-clause, instead of a new block before it.
Will we need to do clean up? I.e. do duplicate subscriptions send duplicate emails?
I moved the logic as you suggested. I think in planning we decided cleanup wouldn't be needed.