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

User notification when Facebook-Connection is invalid #28

Merged
merged 1 commit into from
Mar 26, 2012
Merged

User notification when Facebook-Connection is invalid #28

merged 1 commit into from
Mar 26, 2012

Conversation

CatoTH
Copy link
Collaborator

@CatoTH CatoTH commented Mar 26, 2012

Send a notification to the user if his/her FB-Connections became invalid (usualle after changing the FB-Password)

…lid (usualle after changing the FB-Password)
hurricanerainbow pushed a commit that referenced this pull request Mar 26, 2012
User notification when Facebook-Connection is invalid
@hurricanerainbow hurricanerainbow merged commit 008055c into friendica:master Mar 26, 2012
@friendica
Copy link
Owner

I have two concerns. First, we should mention the site name or URL somewhere in the body so that we know which site is having the problem. (You may have done this, but it wasn't obvious skimming through the patch).

The second is that I'm not sure we aren't protected against getting a lot of emails for the same event. I see you're setting a flag to say that the notification has been sent, but it looks as though this is cleared as soon as the notification is sent. It looks to me like it will keep happening on every communication between us and Facebook. We probably need to instead clear it only if we have made a successful connection since it was set. Or... turn the flag into a timestamp so that we send at most one message a day. Thoughts?

@hurricanerainbow
Copy link
Collaborator

timestamping it some way would be smart, and do a check like every 2 hours or so, then you only have 12 times to check. or some sort of other interval checking. if there's some other stuff checking timestamped things, then 1 extra row or whatever won't matter. successful connection, i can see a potential for annoyance there too, as if it makes a successful cxn., and it fails for some other reason, it'll re-send it. or maybe that's what one wants?

@CatoTH
Copy link
Collaborator Author

CatoTH commented Mar 28, 2012

I made some changes to the notification:

  • The message is sent at max once every 3 days (just a random value, could be anything else as well).
  • The mail is a bit more verbose, something like this:

Your Facebook connection became invalid. Please Re-authenticate.

Hi Tobias Hößl,

The connection between your account on [url=###]Friendica @ Hoessl.eu[/url] and your Facebook-Account became invalid. This usually happens after you change your Facebook-password. To enable the connection again, you have to [url=###]re-authenticate the Facebook-connector[/url].
http:https://friendica.hoessl.eu/notify/view/111
Danke,

der Administrator von Friendica @ Hoessl.eu

One issue with the notification mail is that the notification-mail always embeds an avatar of the sender. In this context, an avatar IMHO does not really make much sense, as the system is the sender, therefore a somewhat broken image is shown. IMHO the best way to deal with this would be to modify the email_notify_html.tpl to only include the image code if an url is given for source_photo (same goes for source_link ...)

@friendica
Copy link
Owner

I think not having an image might break the html layout in the templates - I'll look closer. But you can provide $siteurl/images/person-80.jpg as a fallback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants