* do not use service name as PGSERVICE
* mod PM template: don't pretend it can be processed automatically
service_name = os.environ.get('LIVEAUTOJOINSERVICE', 'autojoin')
def connect_db():
- cn = psycopg2.connect("service={}".format(service_name))
+ cn = psycopg2.connect("")
cr = cn.cursor()
return (cn, cr)
def make_privatemessage_url(service_name, event):
if event and re.match('[a-z0-9]{10,}$', event):
- body = '''I would like to join this thread: https://www.reddit.com/live/{1}
-
-(If you send this message with the following line intact, you will be invited automatically if possible)
-
-/autojoin service {0} event {1}'''.format(service_name, event)
+ body = '''I would like to join this thread: https://www.reddit.com/live/{}'''.format(event)
elif event:
body = '''I would like to join this thread: {}'''.format(event)
else: