Commit Graph

13 Commits

Author SHA1 Message Date
Blade Barringer
35b92f13a3 Webhook improvements (#7879)
* refactor: Move translate test utility to helpers directory

* Add kind property to webhooks

* feat: Add options to create webhook route

* refactor: Move webhook ops into single file

* refactor: Create webhook objects for specific webhook behavior

* chore(tests): Add default sleep helper value of 1 second

* feat(api): Add method for groups to send out webhook

* feat(api): Add taskCreated webhook task creation

* feat(api): Send chat webhooks after a chat is sent

* refactor: Move webhook routes to own controller

* lint: Correct linting errors

* fix(api): Correct taskCreated webhook method

* fix(api): Fix webhook logging to only log when there is an error

* fix: Update groupChatRecieved webhook creation

* chore: Add integration tests for webhooks

* fix: Set webhook creation response to 201

* fix: Correct how task scored webhook data is sent

* Revert group chat recieved webhook to only support one group

* Remove quest activity option for webhooks

* feat: Send webhook for each task created

* feat: Allow webhooks without a type to default to taskScored

* feat: Add logic for adding ids to webhook

* feat: optimize webhook url check by shortcircuiting if no url is passed

* refactor: Use full name for webhook variable

* feat: Add missing params to client webhook

* lint: Add missing semicolon

* chore(tests): Fix inccorect webhook tests

* chore: Add migration to update task scored webhooks

* feat: Allow default value of webhook add route to be enabled

* chore: Update webhook documentation

* chore: Remove special handling for v2

* refactor: adjust addComputedStatsToJSONObject to work for webhooks

* refactor: combine taskScored and taskActivity webhooks

* feat(api): Add task activity to task update and delete routes

* chore: Change references to taskScored to taskActivity

* fix: Correct stats object being passed in for transform

* chore: Remove extra line break

* fix: Pass in the language to use for the translations

* refactor(api): Move webhooks from user.preferences.webhooks to user.webhooks

* chore: Update migration to set webhook array

* lint: Correct brace spacing

* chore: convert webhook lib to use user.webhooks

* refactor(api): Consolidate filters

* chore: clarify migration instructions

* fix(test): Correct user creation in user anonymized tests

* chore: add test that webhooks cannot be updated via PUT /user

* refactor: Simplify default webhook id value

* refactor(client): Push newly created webhook instead of doing a sync

* chore(test): Add test file for webhook model

* refactor: Remove webhook validation

* refactor: Remove need for watch on webhooks

* refactor(client): Update webhooks object without syncing

* chore: update webhook documentation

* Fix migrations issues

* chore: remove v2 test helper

* fix(api): Provide webhook type in task scored webhook

* fix(client): Fix webhook deletion appearing to delete all webhooks

* feat(api): add optional label field for webhooks

* feat: provide empty string as default for webhook label

* chore: Update webhook migration

* chore: update webhook migration name
2016-10-02 09:16:22 -05:00
Phillip Thelen
e3b484b29a Add Google Signin (#7969)
* Start adding google login

* fix local js issue

* implement syntax suggestions

* fix delete social tests

* Add service for authentication alerts

* fix social login tests

* make suggested google sign in changes

* fix accidentally deleted code

* refactor social network sign in

* fix incorrect find

* implement suggested google sign in changes

* fix(tests): Inject fake Auth module for auth controller

* fix(test): prevent social service from causing page reload

* fix loading user info

* Use lodash's implimentation of find for IE compatibility

* chore: increase test coverage around deletion route

* chore: clean up social auth test

* chore: Fix social login tests

* remove profile from login scope

* fix(api): Allow social accounts to deregister as user has auth backup

* temporarily disable google login button
2016-09-28 12:11:10 +02:00
Sabe Jones
51ffe2c8c2 A/B Testing, Round 2 (#8077)
* feat(analytics): A/B test 2016-09-26

* feat(tutorial): A/B variant text
2016-09-26 17:10:43 -05:00
Blade Barringer
81b7eeeb71 Common reorg (#8025)
* Re-organize common folder

* fix: Correct paths in tests

* fix: move new content to proper folder

* chore: Move audio folder to assets

* Move sprites to sprites assets directory

* Move css sprites to assets directory

* Split out readmes for common code and sprites

* Move images to assets directory

* Move destinatin of shared browserified file

* remove unused file

* move compiled js to client-old

* Fix karma tests

* fix: Correct paths for sprites
2016-09-16 17:18:07 +02:00
Sabe Jones
f20a7b851f feat(analytics): AB testing
User model update for AB tests, and the first AB test to start Sept 12

closes #7984
2016-09-12 22:13:25 -05:00
Blade Barringer
78d5f8c4f5 fix(api): prevent users from signing up with habitica or habitrpg emails
fixes #7633
closes #7659
2016-09-12 20:41:44 -05:00
Matteo Pagliazzi
7ccbcd7b33 add reorder task step to ios tutorial, mounts and inbox steps for both android and ios 2016-08-12 14:55:55 +02:00
Oziris
4244c7519e Add Dewin's new Theme (#7795)
* Add files via upload

* Add string for new theme

* Added 'dewinTheme'

* Added 'dewinTheme'

* Delete Boss Battles Background Music.mp3

* Delete Boss Battles Background Music.ogg

* Delete Settings Page Background Music.mp3

* Delete Settings Page Background Music.ogg

* Add audio files with correct names

* Delete Boss Battles_Background_Music.mp3

* Delete Boss Battles_Background_Music.ogg

* Add files via upload
2016-08-02 10:03:01 +10:00
Ross Hardy
2b30c63448 Adding new basic audio theme rosstavoTheme (#7766) 2016-07-12 12:30:44 +10:00
Blade Barringer
81ac45f2a7 fix(api): Grant remaining perks when canceling an Amazon subscription
* Add tests for payments lib
* Add placeholder it blocks to be filled in

closes #7660
closes #4840
2016-06-26 08:08:49 -05:00
Matteo Pagliazzi
08d7727881 Push notifications (#7682)
* Fix Social Push notifications

* Fix code formatting issues

* Fix commented issues

* Fix Syntax errors

* update push notify dependency

* specify push-notify version

* change how apn key is loaded

* feat(push-notifications): improve logging

* feat(push-notifications): disable v2 push notifications

* test(push-notifications): add unit tests and improve integration ones

* fix(push-notifications): throw when required params are missing

* fix(tests): correct descriptions and remove wrong comment

* fix(push-notifications): trim APN key

* fix(apn): log feedback only if it has data

* fix(apn): load cert and key differently

* fix(tests): correctly load apn during tests

* download creds from S3 and create AWS lib

* convert s3 buffer to a string

* fix(apn): remove console.log and do not use cert twice

* invert key and cert, disable failing test

* invert key and cert
2016-06-23 00:19:37 +02:00
Shervin Sarain
539547b39e prevent sync from clearing selected tags (#7631)
* prevent sync from clearing selected tags

* improved tag selection bugfix
2016-06-11 19:57:20 +02:00
Matteo Pagliazzi
f7be7205e7 Remove localstorage and add notifications (#7588)
* move remaining files frm /common/script/public to website/public

* remove localstorage

* add back noscript template and put all javascript in the footer

* fixes client side tests

* remove double quotes where possible

* simplify jade code and add tests for buildManifest

* loading page with logo and spinner

* better loading screen in landscape mode

* icon on top of text logo

* wip: user.notifications

* notifications: simpler and working code

* finish implementing notifications

* correct loading screen css and re-inline images

* add tests for user notifications

* split User model in multiple files

* remove old comment about missing .catch()

* correctly setup hooks and methods for User model. Cleanup localstorage

* include UserNotificationsService in static page js and split loading-screen css in its own file

* add cron notification and misc fixes

* remove console.log

* fix tests

* fix multiple notifications
2016-06-07 16:14:19 +02:00