Commit Graph

152 Commits

Author SHA1 Message Date
Jonathan Featherstone 8be6311db0 Add priority queue to notifications
Significant delays are happening in high priority messages being
delivered to clients due to lack of delivery prioritization. Implement
simple delivery prioritization with "high priority" queue to prevent
password resets and other high priority messages from being delayed.

Test plan:
* Deploy to canary or beta environment
* Create user with @instructure.com email address
* Take user through password reset process and confirm that email is
  received

refs SAS-1442

Change-Id: I0b4f98ac03c5a5ee24e903a913614c005a12ead8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/231036
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
2020-03-24 22:47:31 +00:00
Cody Cutrer 6aa9a2e7aa avoid updating messages immediately after creating them in bulk dispatch
Change-Id: I5a50cb4d52624e69c32406c5039bca4318576413
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/231024
Reviewed-by: James Williams <jamesw@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2020-03-24 21:14:43 +00:00
Ben Nelson d77795779c Restrict SMS notification types
We are restricting the types of notifcations that will be delivered via
SMS to the types listed in the the change.

Test Plan:
 - Have a student with an SMS communication channel confirmed and set to
     ASAP on all notification types
 - Trigger an Announcement notification
 - Verify that the message was queued to be sent (/users/<id>/messages)
 - Trigger a non-allowed notifcation type (such as Conversation Message)
 - Verify that the message was not set to be delivered

closes KNO-274
flag=deprecate_sms

Change-Id: Ic82ac60294807d0659dd207c1b24f4ffa0b00a58
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/228755
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
2020-03-12 16:25:31 +00:00
Rob Orton 5e76206419 add unique index to notification endpoints
currently there is a race condition that allows creating two
notification endpoints which causes uses to get duplicate push 
notifications. This commit cleans up existing duplicate endpoints, and
adds an index to prevent duplicates. Also protected against duplicates in the request.

test plan
 - setup ios push notifications
 - it should only create one notification endpoint

fixes KNO-261

Change-Id: I8fe3d5dbac1429bdba7be2431265e214e9530cbf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/227894
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
2020-02-28 19:06:27 +00:00
Ben Nelson 24f653a46a Use custom account name for global announcements
When sending a notification for a global announcement we should be
respecting the "Custom 'From' Name" account setting if it is set.

Test Plan:
 - Ensure that the feature flag "Immediate notifications for global
     announcements" is turned on
 - Ensure that you have a user with a confirmed email address who has
     the "Global Announcements" notification preference set to ASAP
 - Navigate to the account settings page
 - Click on the Notifications tab
 - Set a Custom From Name and save
 - Click the Announcements tab
 - Create a new announcement with
 -- Start date in the past
 -- End date in the future
 -- Check the box to send notifications directly to users
 - Check a user's users/<user_id>/messages page for the announcement
 - Verify that the "From Name" field is the custom name you set

fixes KNO-291
flag=none

Change-Id: I5d48f1568718b548001ca8aef7cde49295089032
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/227654
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
QA-Review: Matthew Lemon <mlemon@instructure.com>
Product-Review: Ben Nelson <bnelson@instructure.com>
2020-02-25 20:45:23 +00:00
Cody Cutrer 5195491c34 rails 6: various fixes
mostly separating out conditions for .where.not calls

Change-Id: I4a22c3acaf606cc712699b5fca7a95d136bbfe1e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/224595
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-01-31 16:26:39 +00:00
Rob Orton 7d7214175b log stats when we deliver messages
test plan
 - messages should start sending stats to dd

fixes KNO-157

Change-Id: I46bddd942e0945c9771863fcd0ed48afdc46cd68
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/217934
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2019-11-20 02:17:39 +00:00
Steven Burnett 25beca17cc fallback to sms template when slack not found
Test Plan:
- Tests pass
- notifications function as normal
- slack notifications still look like sms templated ones

Change-Id: I9025e72fb0085626aa22b586b630bd4cb8b40290
Reviewed-on: https://gerrit.instructure.com/210297
Tested-by: Jenkins
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2019-09-25 20:28:13 +00:00
Steven Burnett 6719ec01b5 add slack integration
fixes COMMS-2210 COMMS-2211 COMMS-2212 COMMS-2148

Test Plan:
- To test this feature you either need your own test instance of slack
  or need to join the one andrew huff created.  Ask Steven Burnett
  for an invite to the test one (its probably easier that way) make sure
  whatever account you register with is an instructure based email address
- First configure notification_service.yml
  (ask steven to zerobin you the creds and config
   so that you can connect to NS edge)
- Restart your server once the config is updated
- Go to the account with the user you want to test with
- navigate to the account settings
  http://localhost:3000/accounts/1/settings
- navigate down to where it says Slack Api Key
- enter in the api key from either your test instance or the one in the
  channel description of andrew huff #test channel
- click update settings at the bottom
- go to your user in that account now
- click "add other communication method"
- click slack
- click add an *instructure based email* otherwise you won't get
  anything since we blacklist no inst emails
- click add
- notice you got a slack message
- thats it

Change-Id: I91c82438ab9ab787176f587a11c13d650c5da6f4
Reviewed-on: https://gerrit.instructure.com/200390
Tested-by: Jenkins
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Ben Nelson <bnelson@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2019-07-29 23:29:16 +00:00
Rob Orton 9c520721ee send better contexts to sis_pseudonym
fixes CANVAS-6YGK in sentry

test plan
 - specs should pass

Change-Id: If14754c714f67a67378663bc869191536fac4454
Reviewed-on: https://gerrit.instructure.com/189180
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2019-04-15 18:05:30 +00:00
Rob Orton 380193b680 cleanup from when yo was removed
Change-Id: I69568a340d5c5b9acd215ef23a10df3870a1fd37
Reviewed-on: https://gerrit.instructure.com/178649
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-01-25 17:24:14 +00:00
James Williams 4076170f58 fall back to id-only query when searching for queued message
Change-Id: I7890c8d95892c2be4fd59a07d5d955a9d1288645
Reviewed-on: https://gerrit.instructure.com/177448
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-01-11 14:09:10 +00:00
James Williams 3e161cb6e8 partition messages
test plan:
* run the migrations
* sending messages and viewing them as an admin
 should work as before

closes #COMMS-1327

Change-Id: If955b49d07fa68f8a5151984eb4d9c3b97b118ee
Reviewed-on: https://gerrit.instructure.com/170657
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2018-12-10 13:42:35 +00:00
Gary Mei 5bad85694c anonymize submission comment emails for teachers
When an assignment is still anonymous and muted, students submitting
comments to a submission will be anonymized in emails for teachers.

closes GRADE-1825

Test Plan
- Set up working email notifications for a teacher.
- Create an anonymous assignment due in the past.
- Have a student submit to the assignment.
- Have the student comment on their submission.
- Verify that the emails contain anonymized names, and links to the
  submission are to SpeedGrader (for that student's submission)
  rather than the submission details page itself.

Change-Id: I5844646be5090fa6b3588a317f49f9953abb1fbf
Reviewed-on: https://gerrit.instructure.com/173398
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Keith Garner <kgarner@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-11-30 19:40:19 +00:00
Mysti Sadler a1ba84d88a Setting for observers to see student names in notifications
Test plan
- As an observer (who is observing a student
  either through the observer role linked to
  a student or through an observer enrollment
  linked to a student enrollment
- Verify that you can see the setting in user's
  notification settings
- Verify that when you send a submission graded
  or submission grade changed notification
  (email, html email, twitter, text, summary)
  you get the student's name in the notification
- Other notifications should be updated in the
  future, but will be on other commits

Change-Id: Ia05b42b8d0a80e5aa41de2cc5151caa258142fda
Reviewed-on: https://gerrit.instructure.com/167854
Tested-by: Jenkins
Product-Review: Matthew Goodwin <mattg@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
2018-10-22 20:51:13 +00:00
Aaron Kc Hsu 4d6ff90aaf Add The Correct From Context For Appointment Group Notifications
fixes COMMS-1046

Test Plan
- Create 3 courses and enroll a student and teacher (different
users) in all 3 courses.

1. Go to the calendar as the teacher mentioned above
2. Create an appointment group setup across all 3 courses
2.5. Click the appointment group tab in the top right corner to create
one
3. Check the students notifications (or their /users/id/messages) and
notice the sender of the course is correct for all 3 notifications

Change-Id: I4e27f707faaa5b4f53ed134b556cdd2cb3cf3378
Reviewed-on: https://gerrit.instructure.com/147657
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Venk Natarajan <vnatarajan@instructure.com>
Product-Review: Aaron Kc Hsu <ahsu@instructure.com>
2018-04-24 17:37:22 +00:00
Cody Cutrer e67fb3d3e4 use Erubi, not Erubis
Change-Id: I22efdd20563c11e98284083e7e99cbed45ef22ed
Reviewed-on: https://gerrit.instructure.com/146527
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2018-04-11 22:48:10 +00:00
Rob Orton e94edb2d57 removes integration for yo
Change-Id: I07ead643ba3078707d2b34d706d215f804e36679
Reviewed-on: https://gerrit.instructure.com/146258
Tested-by: Jenkins
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2018-04-10 20:15:41 +00:00
Rob Orton e68b92b2c2 Revert "fix footer logo in footer of emails"
This reverts commit 2b9853c82d

but replaces the googlusercontent url that doesn't exist on the 
internet with one that will continue to exist:

aka: https://du11hjcvx0uqb.cloudfront.net/dist/images/email_signature-ea0b2cda73.png

Change-Id: I82ba0bb3cc5ae3ef4749f1fcaabe783775dcfc78
Reviewed-on: https://gerrit.instructure.com/143074
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2018-03-09 00:16:53 +00:00
Steven Burnett 2b9853c82d fix footer logo in footer of emails
fixes COMMS-939

Test Plan:
- send any email in canvas
- notice the footer image is there
- inspect the html source, and notice that the host is
  your local Canvas install
- enable CDN config, run `node_modules/.bin/gulp rev`,
  and `rake canvas:cdn:upload_to_s3`
- send another enable
- notice the footer image is still there
- inspect the html source, and notice that the host
  is the CDN
Change-Id: Ieaed838dee02168a2aa67f3448d8d68fb6f5b701
Reviewed-on: https://gerrit.instructure.com/142889
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Gentry Beckmann <gbeckmann@instructure.com>
Product-Review: Gentry Beckmann <gbeckmann@instructure.com>
2018-03-08 17:53:17 +00:00
James Williams 9d06b71032 mark a message as failed if there are no targets
refs #COMMS-867

Change-Id: I025d96789f2baf9d60265e39504b08ccb52535d7
Reviewed-on: https://gerrit.instructure.com/141657
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2018-02-22 22:40:24 +00:00
Simon Williams affa953f61 drop Message#asset_context and DelayedNotification#asset_context
name did not match usage, and all remaining usage can be satisfied in
other ways.

closes CNVS-38407

test plan: regression test message sending (immediate, delayed, and
dashboard notifications w/ stream items)

Change-Id: Ibe110527b4644cbaa417c53b2b53c2fd7e18dc9e
Reviewed-on: https://gerrit.instructure.com/120520
Tested-by: Jenkins
QA-Review: Heath Hales <hhales@instructure.com>
Reviewed-by: Matt Smith <msmith@instructure.com>
Reviewed-by: Benjamin Christian Nelson <bcnelson@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2017-08-22 17:47:51 +00:00
Simon Williams 3dadfdba88 add from_name to CommMessage api
closes CNVS-38354

test plan:
- hit the CommMessages api
- it should return `from` and `from_name`

Change-Id: Ie06a09e778a3f0098a1ae80cd5bfc237014715bb
Reviewed-on: https://gerrit.instructure.com/120316
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2017-08-15 15:47:22 +00:00
Simon Williams 80acdad108 set message from_name as course/group name when possible
fixes CNVS-38237

test plan:
- generate messages at the course level, like new assignment,
discussion, quiz, graded, etc.
- it should use the course name as the from_name

Change-Id: I5f51abd5a51f43fefbadb4cb0763c4480a1c869c
Reviewed-on: https://gerrit.instructure.com/120319
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: David Mirabile <dmirabile-c@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2017-08-07 16:02:56 +00:00
Cody Cutrer c3e4d6630e don't allow vanilla polymorphic: true
Change-Id: I7bde198887b111ac0883fe923eb45bd690426e7e
Reviewed-on: https://gerrit.instructure.com/121040
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-08-02 15:13:53 +00:00
Simon Williams 3d8c592d3c rename Messages::AssetContext to Messages::NameHelper
Change-Id: I780864e4dcd5dee943a4e94d29b2ed6f8feffaff
Reviewed-on: https://gerrit.instructure.com/120465
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2017-07-27 15:39:11 +00:00
Simon Williams c5ba9dd6bd drop messages.asset_context_code, unused
closes CNVS-38367

test plan: send a message, it should work

Change-Id: Ic1b99120ee0c93155a4a4475f4d1dfb3d373be37
Reviewed-on: https://gerrit.instructure.com/120424
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Matt Smith <msmith@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2017-07-27 15:05:53 +00:00
Simon Williams bcb7ea7127 when notification_service is on in site admin, always use it
fixes CNVS-37405

test plan:
- enable the notification service
- enable the ticketing system plugin to deliver via email
- generate a ticket
- it should go through the notification service

Change-Id: If133b96e35352c7bab90e5e2c1868cb20d85230d
Reviewed-on: https://gerrit.instructure.com/114974
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2017-06-12 18:29:27 +00:00
Jeremy Stanley 3d66ec5d74 notify when a blueprint sync completes
test plan: enable Blueprint Sync in notification preferences,
 perform syncs, and ensure admins and teachers get appropriate
 notifications in /users/id/messages.

 also test twitter, sms, and summary notifications.

 to test summary notifications:
 1. configure an email address to receive daily or weekly
    summaries (doesn't matter which; we will override the time)
 2. perform a sync
 3. in a console, force the messages to come due for delivery,
    and then queue them up (make sure jobs are running):

DelayedMessage.where(workflow_state: 'pending').update_all(send_at: 1.day.ago)
SummaryMessageConsolidator.process

 4. the summary message should then be visible in
    /users/X/messages

closes MC-102

Change-Id: I5e259e55f0684a05de27ec0a80ec59679d6cd5a6
Reviewed-on: https://gerrit.instructure.com/110927
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2017-05-19 22:08:46 +00:00
Cody Cutrer 99f5b454ed refactor and unify User#find_pseudonym_for_account and SisPseudonym
fixes CNVS-35919

also, prefer SIS pseudonyms over non-SIS pseudonyms from any given
account

test plan:
 * have a non-SIS pseudonym and a SIS pseudonym on a user
 * do an LTI launch
 * the LTI tool should get the info from the SIS pseudonym

Change-Id: I60a3c48a32eae94db93b0e72f1f0f6c5b6a5f5c2
Reviewed-on: https://gerrit.instructure.com/107785
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
2017-05-02 18:50:31 +00:00
Landon Wilkins ba2daaf158 da licença part 13
add consistent license headers to all source files
(ruby, coffeescript, javascript)

except for vendor files

Change-Id: I120ddb74d7f2a34153334b01d3ce2fb77000a631
Reviewed-on: https://gerrit.instructure.com/110034
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-27 21:51:17 +00:00
Cody Cutrer ce21af8ecf rails 5: find and fix lots of deprecation warnings [ci verbose]
refs CNVS-34843

Change-Id: Idd523c2a7c37325381d590f1ee70c406ace2a459
Reviewed-on: https://gerrit.instructure.com/105033
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-03-16 16:03:51 +00:00
James Williams 0126d90e8e set inverse_of for polymorphic associations, again
basically means we don't have to reload the contexts
all the time

also make sure that inverse associations are populated
when calling temp_record

Change-Id: I2a0baefeccc814746a241f506a8f2db02aa8eebf
Reviewed-on: https://gerrit.instructure.com/99642
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
2017-01-16 20:15:20 +00:00
Landon Wilkins 7bc6743b0b Revert "set inverse_of for polymorphic associations"
This reverts commit c20d270a4a.

Change-Id: I0227de546fc7ea22efd6b2acb6b77982f52bde52
Reviewed-on: https://gerrit.instructure.com/99570
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-01-13 18:50:07 +00:00
James Williams c20d270a4a set inverse_of for polymorphic associations
basically means we don't have to reload the contexts
all the time

also make sure that inverse associations are populated
when calling temp_record

Change-Id: I22adf77d218f8084f76632d397161c05945cbae4
Reviewed-on: https://gerrit.instructure.com/98381
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-01-13 12:37:26 +00:00
James Williams 89370c5f11 remove protected_attributes
refs #CNVS-32574

Change-Id: I3ba018a7110a7530c9af4a59c97422f626a749b6
Reviewed-on: https://gerrit.instructure.com/99260
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-01-12 17:46:18 +00:00
James Williams f0100085af strong params part M-O
refs #CNVS-32574

Change-Id: Ic42c1c7bcc85c99818386392b1a0ebb55229e43c
Reviewed-on: https://gerrit.instructure.com/94679
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-01-10 18:19:10 +00:00
Cody Cutrer 0bff84a38f convert notification service to AWS SDK v2
Change-Id: I1fff53fa83161e618f43adb0120d5f36624653f5
Reviewed-on: https://gerrit.instructure.com/93010
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2016-10-31 17:44:57 +00:00
Steven Burnett d82467d3a8 fix empty sms confirmation codes
fixes CNVS-30820

Test Plan:
- set up your environment with a notification Service env
  (must be either edge/beta/prod)
- Register an sms communication channel (non international)
- Notice you get the code via text

Change-Id: I729764e9d8b7ab90d697c69c8202a3bcbdb62235
Reviewed-on: https://gerrit.instructure.com/87827
Tested-by: Jenkins
Reviewed-by: Andrew Huff <ahuff@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2016-08-16 20:19:24 +00:00
James Williams 69f5fcaca4 use correct domain for communication channel notification links
fixes issues when confirming a communication channel is
creating a notification that sends to the domain for the
user's original pseudonym

fixes #CNVS-29907

Change-Id: Ibbbd7e0f7c9ec9fe880353e0a856ce6d080c254c
Reviewed-on: https://gerrit.instructure.com/82333
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-06-13 16:59:35 +00:00
Andrew Huff 6b35c95e8d add link to Course Enrollment email notification
fixes CNVS-29366

When a user is enrolled (not invited) in a course, the email
notification will now include a link to the course. The link is an html
button (similar to the one in Course Invitation emails), and another
link has been added to the footer.

Both of these changes make Course Enrollment emails look more similar
to Course Invitation emails.

Test Plan:

* Enroll an existing user in a course. (Make sure this an Enrollment,
  not an Invitation. One way to do this is to enroll the user using the
  API with URL parameters `enrollment[notify]=true` and
  `enrollment[enrollment_state]=active`)
* View the sent message at http://canvas.docker/users/:user_id/messages
* Verify the HTML version of the email notification has 2 links to the
  course--a large button in the body of the message, and a link in the
  footer

Change-Id: Ic4b2f6312a71aa379bba581fc08230af01b0dfa0
Reviewed-on: https://gerrit.instructure.com/80084
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Andrew Huff <ahuff@instructure.com>
2016-05-24 15:48:24 +00:00
Simon Williams 87c52d7ca1 remove notification service load test setting
closes CNVS-28905

test plan: message delivery should still work with or without the
service

Change-Id: I9207bd51d839029977988116ee95bb100f56160a
Reviewed-on: https://gerrit.instructure.com/77700
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Gentry Beckmann <gbeckmann@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2016-05-02 15:32:16 +00:00
Simon Williams 5842c85f61 don't mark message sent/failed when 'doubling' traffic
we have a flag to let us run a load test for the new notification
service, where traffic will be sent to the service but still delivered
by canvas.  in that case, don't mark a message as sent/failed after
sending to the service.

fixes CNVS-28302

test plan:
- basic regression test of sending messages with the service
- basic regression test of 'doubling' traffic

Change-Id: I28b8df1b9fa107f10c155f4074c5bfbd7aad2761
Reviewed-on: https://gerrit.instructure.com/75503
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Jenkins
Reviewed-by: Christina Wuest <cwuest@instructure.com>
QA-Review: Gentry Beckmann <gbeckmann@instructure.com>
Product-Review: Gentry Beckmann <gbeckmann@instructure.com>
2016-03-30 19:10:11 +00:00
Steven Burnett 9fd5b042f1 catch all aws errors from sqs
fixes CNVS-28333

Test Plan:
- Cause failures when sending messages with aws
- verify tests pass

Change-Id: I434f4043120520679c98e3ecb8057a54335b773a
Reviewed-on: https://gerrit.instructure.com/75733
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Gentry Beckmann <gbeckmann@instructure.com>
Product-Review: Gentry Beckmann <gbeckmann@instructure.com>
2016-03-30 17:06:25 +00:00
Simon Williams 2db1a2e6e0 remove unused 'remote' option from notification service
Change-Id: I591adf6c10b65e9caa511cf99dea00020ed6ea2e
Reviewed-on: https://gerrit.instructure.com/74864
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2016-03-18 20:18:00 +00:00
Simon Williams f9af2215ee move NotificationService to lib/services
fixes CNVS-28126

test plan: no functional changes, move files around

Change-Id: I52a17da9da721518333ed25200ffa23620678cb9
Reviewed-on: https://gerrit.instructure.com/74863
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2016-03-18 20:17:41 +00:00
James Williams b7ab6aa88b drop a bunch of unused columns
like literally all NULL everywhere

refs #CNVS-27773

Change-Id: I1e5b61a6fd234ce668824e59df0d93a31ea6e76e
Reviewed-on: https://gerrit.instructure.com/74172
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-03-17 17:19:13 +00:00
James Williams 84f0e8d9f7 remove old always-on features
closes #CNVS-27699

Change-Id: I5af3d9915fef4189204283ca87cafc540ed3eed4
Reviewed-on: https://gerrit.instructure.com/73566
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-03-03 16:50:13 +00:00
Rob Orton ce50baf0bc fix validation to be text instead of string
refs CNVS-21253

test plan
 - subject over 255 char should not error

Change-Id: I0f771f463ff7eecfcdf7132cf78ea78a83c3892f
Reviewed-on: https://gerrit.instructure.com/72962
Reviewed-by: Joel Hough <joel@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Tested-by: Rob Orton <rob@instructure.com>
2016-02-24 22:21:08 +00:00
Steven Burnett 13e290691f add double enqueueing of notifications
fixes CNVS-27200

Test Plan:
- generate a notification with the setting and feature
  flag on.
- Notice you get the notification twice.

Change-Id: I91afbda437b730c814969f36916c8176083a926c
Reviewed-on: https://gerrit.instructure.com/72390
Reviewed-by: Christina Wuest <cwuest@instructure.com>
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Jenkins
QA-Review: Gentry Beckmann <gbeckmann@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2016-02-20 01:49:34 +00:00