Closed U-238 closed 11 years ago
unique_id: (not saved in the sever)
1: mechanism for checking validity (unknown?) 2: mechanism for extracting user id (lots of ways, which is best?)
Currently, the "forgot password" functionality (which is a built-in feature of Django) creates a unique ID to be sent as part of the forgot password URL. You could see how they do it, and use something similar.
file: myrobogals/daemons/rgsmsd.c line: 201
if (msgarray[oddeven][j][2] == 20 || msgarray[oddeven][j][2] == 22) { index out of range?
variable: int msgarray[2][101][2];
What are the values of oddeven and j when you get index out of range?
Also, how is rgsmsd.c involved in the unsubscribe link issue?
Currently, when someone goes to "Send bulk SMS", there is a default opt-out message included.
So I thought the opt-out message related operations are done in the daemons for sending SMS.
Did not actually run the code, just by reading and thought it strange. Below are my understanding of the variable: msgarray[oddeven][j][i]:
oddeven: rotating storage for preventing processing a recipient twice within at least 250000, at most 250000 micro-seconds.
j: recipients to be processed, or processed.
i: 0: recipient id 1: recipient status
msgarray possible arrangement:
For send bulk SMS, no substitution is needed in the opt-out message because there's no unique ID in the opt-out message. As such, no substitution is done in the daemon.
oddeven alternates between 0 and 1 with each loop, this is a way of making sure that any message ID sent in the current loop is not the same as a message ID sent in the previous loop. This protects against sending the same message over and over, in the case where the database cannot be written to, so the message is always marked as "pending" even after being sent.
the cron lock file worries me!
unique key:
hash = sha_constructor(unicode(user.id) + unicode(timestamp)).hexdigest()[::2]
Cron lock file is to make sure only 1 instance of the script is running simultaneously
I will look into it further.
New feature merged and tested. Well done! Issue closed.
Currently, when someone goes to "Send bulk SMS", there is a default opt-out message included.
Email should have something similar - something that says by default in the body field in "Send bulk email", something like: "This email has been sent to you by Robogals Adelaide (unsubscribe)"
The word "unsubscribe" is a link, and when someone clicks that link they can confirm their unsubscription. If they choose to unsubscribe, it will set email_chapter_optin = False
The unsubscribe link will need to have some kind of unique ID for that user. For this, you will probably need to edit send_email_cron.php to have a substitution field like {{unique_id}}
If the user is unsubscribing using the link, they do not need to be logged in.
This feature is something that I've been thinking of for a while but it was also recently requested by the Sydney chapter.