User notification when Facebook-Connection is invalid #28

Merged
CatoTH merged 1 commit from master into master 2012-03-26 20:34:27 +02:00
CatoTH commented 2012-03-26 15:09:48 +02:00 (Migrated from github.com)

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

Send a notification to the user if his/her FB-Connections became invalid (usualle after changing the FB-Password)
friendica commented 2012-03-26 23:52:18 +02:00 (Migrated from github.com)

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?

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?
ericcotelnu commented 2012-03-28 11:59:05 +02:00 (Migrated from github.com)

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?

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 commented 2012-03-28 21:31:59 +02:00 (Migrated from github.com)

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://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 ...)

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://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 commented 2012-03-29 00:00:02 +02:00 (Migrated from github.com)

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.

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 in to join this conversation.
No description provided.