ether / ep_email_notifications Goto Github PK
View Code? Open in Web Editor NEWSubscribe to a pad and recieve an email when someone edits your pad
License: Apache License 2.0
Subscribe to a pad and recieve an email when someone edits your pad
License: Apache License 2.0
This the output that desbribes the error:
[2014-03-17 19:22:32.299] [ERROR] console - TypeError: undefined is not a function
at Object.exports.checkEmailValidation (/home/etherpad/etherpad-lite/node_modules/ep_email_notifications/handleMessage.js:333:19)
at Object.exports.subscriptionEmail (/home/etherpad/etherpad-lite/node_modules/ep_email_notifications/handleMessage.js:163:34)
at Object.callback (/home/etherpad/etherpad-lite/node_modules/ep_email_notifications/handleMessage.js:83:25)
at /home/etherpad/etherpad-lite/src/node_modules/ueberDB/CloneAndAtomicLayer.js:100:17
at exports.database.get (/home/etherpad/etherpad-lite/src/node_modules/ueberDB/CacheAndBufferLayer.js:144:5)
at doOperation [as operatorFunction] (/home/etherpad/etherpad-lite/src/node_modules/ueberDB/CloneAndAtomicLayer.js:94:18)
at exports.channels.emit (/home/etherpad/etherpad-lite/src/node_modules/ueberDB/node_modules/channels/channels.js:38:11)
at exports.database.get (/home/etherpad/etherpad-lite/src/node_modules/ueberDB/CloneAndAtomicLayer.js:62:17)
at Object.exports.handleMessage [as hook_fn] (/home/etherpad/etherpad-lite/node_modules/ep_email_notifications/handleMessage.js:40:14)
at normalizedhook (/home/etherpad/etherpad-lite/src/static/js/pluginfw/hooks.js:15:27)
[2014-03-17 19:22:32.300] [INFO] console - graceful shutdown...
[2014-03-17 19:22:32.359] [INFO] console - db sucessfully closed.
This is what I have in my settings.json file:
"ep_email_notifications" : {
"checkFrequency": "6000", // checkFrequency = How frequently(milliseconds) to check for pad updates -- Move me to the settings file
"staleTime": "30000", // staleTime = How stale(milliseconds) does a pad need to be before notifying subscribers? Move me to settings
"fromName": "Redes de Pares",
"fromEmail": "[email protected]",
"urlToPads": "http://pad.redesdepares.org/p/", // urlToPads = The URL to your pads note the trailing /
"emailServer": { // See https://github.com/eleith/emailjs for settings
"host": "127.0.0.1"
}
},
so that users can inspect and change their e-mail address.
I suggest, to add this to user name setting box or to the general settings box.
Hi, I would like to add a flag called 'ActivationEmailRequired' that we could set up in the settings.json. If the flag is set to 'No', for subscribing and unsubscribing to a pad, etherpad will not send an email with an activation link but directly subscribes the user to pad upon entering the email address and hitting the subscribe button. Shall I implement this feature?
Thanks!
Hi,
while testing the plugin I realized that the templates/response.ejs has a link to the pad that is subscribed. But this link doesn't use the correct URL if the URL has been customized or we use a proxy.
Nevertheless this is no problem, because in the settings there is the correct path to the pad in the attribute urlToPads.
So I propose a simple patch:
--- index.js.old 2015-06-25 12:55:13.000000000 +0200
+++ index.js 2015-06-29 16:24:25.992173034 +0200
@@ -15,7 +15,7 @@
var param = path[3].split("=");
var action = param[0];
var actionId = param[1];
\- var padURL = req.protocol + "://" + req.get('host') + "/p/" +padId;
\+ var padURL = (settings.ep_email_notifications.urlToPads?settings.ep_email_notifications.urlToPads:req.protocol + "://" + req.get('host') + "/p/") +padId;
async.waterfall(
[
https://zerobin.net/?4c2b4307844c9c99#9lBQNjdzb4W7oerhtHz+YyCAIQQ2U7v8wmPSi5DWC6Y=
This will use the settings if available, else it will construct the URL.
Maybe this can be used in a future release. Thanks.
With the Colibris skin, the popup looks like this:
Problems with this:
With the latest etherpad-lite (v1.5.6, git sha: 0a9c631):
[2015-05-02 11:23:25.156] [ERROR] console - SyntaxError: Invalid regular expression: /^\/p\/(.*)\/(?(?:([^\/]+?))){0,1}subscribe=(.*)\/?$/: Invalid group
at new RegExp (<anonymous>)
at pathtoRegexp (/home/etherpad/etherpad-lite/src/node_modules/express/node_modules/path-to-regexp/index.js:69:10)
at new Layer (/home/etherpad/etherpad-lite/src/node_modules/express/lib/router/layer.js:32:17)
at Function.proto.route (/home/etherpad/etherpad-lite/src/node_modules/express/lib/router/index.js:482:15)
at EventEmitter.app.(anonymous function) [as get] (/home/etherpad/etherpad-lite/src/node_modules/express/lib/application.js:464:30)
at Object.exports.registerRoute [as hook_fn] (/home/etherpad/etherpad-lite/node_modules/ep_email_notifications/index.js:11:12)
at normalizedhook (/home/etherpad/etherpad-lite/src/static/js/pluginfw/hooks.js:15:27)
at hookCallWrapper (/home/etherpad/etherpad-lite/src/static/js/pluginfw/hooks.js:21:14)
at /home/etherpad/etherpad-lite/src/static/js/pluginfw/hooks.js:76:14
at Function._.map._.collect (/home/etherpad/etherpad-lite/src/node_modules/underscore/underscore.js:172:24)
Hello,
first, let me say this plugin seems a great improvement to etherpad to allow users to follow a pad along the time, thank you for this work!
I did not try this plugin so perhaps is it already done, I wondered if it is possible to include a diff (possibly raw text without formating).
The proposition #29 of a link to the modifications seems interesting seems a bit difficult since theses differences can possibly be at several places into the pad.
Moreover, I think it would need the plugin to allow link to a line (ep_scrollto or an anchor. However, ep_scrollto seems not to solve the situation since the line will not be consistent during the time if another line is added before. The anchor has to be added manually so it does not seem simple neither...
I'm sorry, I have more questions than answers but perhaps someone has already thinked more about this and has somes ideas. :)
This is an issue tracker and a checklist for collecting ideas for improvements. Everyone who can is invited to update this first post (for example, adding issue numbers or other references).
In the following, the abbreviation "enotif" stands for "Etherpad E-Mail Notification".
*) like programmed inMediaWiki
enotifs: each recipient receives a customized mail with a customized link to the difference between "his/her" last seen version of that pad and the present version (time of clicking and visiting the pad, not the time, when the enotif was sent.)
I installed ep_email_notifications via admin/-dashboard. The installed version is 0.0.7 which was last updated 3 months ago. The german locales file is missing for example.
https://npmjs.org/package/ep_email_notifications
How can I update the plugin?
Can I just take this repository and copy it into node_modules or is there a better way?
Best regards,
Matthias
[ERROR] console - ReferenceError: padId is not defined
at Object.exports.padUsers (/srv/etherpad/src/node/handler/PadMessageHandler.js:1427:42)
at Object.exports.isUserEditingPad (/srv/etherpad/node_modules/ep_email_notifications/update.js:124:7)
at exports.notifyBegin (/srv/etherpad/node_modules/ep_email_notifications/update.js:47:17)
at async.forEach (/srv/etherpad/src/node_modules/async/lib/async.js:86:13)
at Array.forEach (native)
at _forEach (/srv/etherpad/src/node_modules/async/lib/async.js:26:24)
at Object.async.forEach (/srv/etherpad/src/node_modules/async/lib/async.js:85:9)
at Object.exports.notifyBegin as callback
at /srv/etherpad/src/node_modules/ueberDB/CloneAndAtomicLayer.js:100:17
at exports.database.get (/srv/etherpad/src/node_modules/ueberDB/CacheAndBufferLayer.js:198:7)
software is licensed proprietary by default, meaning no
one other than the copyright holder has the rights
to do much of anything with it
s/recieve/receive/
Several times recieve
in your current code.
grep -rl recieve * | xargs sed -i -e 's/recieve/receive/'
Hello,
In this plugin, there are some locales to translate some stuff (like the pop-up, etc...), but it doesn't translate the email itself (which is sent to the recipients), because the strings are hard-coded in the JavaScript.
Is it possible to implement i18n for the email too ?
please can you add a direct link and information where and how to add - after adding the plugin - the
ty in advance
So you always get an email even if it's you that's editing it. Dunno why this broke prolly a race condition. For now code is commented out
pinned to old version
Seems a bit weird...
Hi,
I have installed ep_email_notification without any problems.
I managed to send an email containing the link
https://domain.com/p/padname/subscribe=confirmationcode
The issue I have is the response I get:
Its an error 404 with the message:
Cannot GET /p/padname/subscribe=confirmationcode
The OS is Linux Ubuntu Server 12.04 LTS
What am I doing wrong? Why doesn't the hook fire? Which hook should fire? How can I test this best?
Thank you for your help with this issue.
Cheers,
froiloc
Hi, I am not sure whether this is the right place to ask. I am trying to use the ether pad email notifications plugin in my project and not able to set it up. Can you point me to any resource that explains the setting up of this plugin?
Thanks
Hi,
When I click on the link in the email (http://pad.cyril-barillet.com/p/testtest/subscribe=Pov7AX3B7LJvcaXRB3syqiVB7), I have this message: Cannot GET /p/testtest/subscribe=Pov7AX3B7LJvcaXRB3syqiVB7
Best regards.
I can't make it work.
I added in my settings.json the "ep_email_notifications" section.
I noticed the same problem with the emailjs plugin (dependency of your plugin not in the right place)
So I installed it manually: npm install emailjs
When modifying a page, I have the notification asking me for my email address.
In the store table in my Db, I can see the record 'emailSubscription' with my address (I did it with 2 different browsers and 2 different user / email addresses)
But no mails are send.
/var/log/mail.log shows nothing.
In the etherpad logs, I can see:
[2013-03-19 21:59:49.864] [WARN] message - Dropped message, unknown COLLABROOM Data Type USERINFO_AUTHOR_EMAIL_IS_REGISTERED_TO_PAD
Etherpad-lite v1.2.9
Plugin installed via the plugin page from the admin interface.
when i add this to the bottom of the settings.json file.. it never passes.
[2014-03-12 20:51:55.764] [ERROR] console - There was an error processing your settings.json file: Unexpected token p
can you please add an example settings.json file to any plugin that requires you to modify settings.json.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.