|
a/Allura/allura/model/notification.py |
|
b/Allura/allura/model/notification.py |
|
... |
|
... |
122 |
idx['title_s'], artifact.email_address),
|
122 |
idx['title_s'], artifact.email_address),
|
123 |
subject=subject_prefix + subject,
|
123 |
subject=subject_prefix + subject,
|
124 |
text=kwargs.pop('text', subject))
|
124 |
text=kwargs.pop('text', subject))
|
125 |
if not d.get('text'):
|
125 |
if not d.get('text'):
|
126 |
d['text'] = ''
|
126 |
d['text'] = ''
|
|
|
127 |
assert d['reply_to_address'] is not None
|
127 |
n = cls(artifact_reference=artifact.dump_ref(),
|
128 |
n = cls(artifact_reference=artifact.dump_ref(),
|
128 |
topic=topic,
|
129 |
topic=topic,
|
129 |
link=kwargs.pop('link', artifact.url()),
|
130 |
link=kwargs.pop('link', artifact.url()),
|
130 |
**d)
|
131 |
**d)
|
131 |
return n
|
132 |
return n
|
|
... |
|
... |
168 |
text.append(n.footer())
|
169 |
text.append(n.footer())
|
169 |
text = '\n'.join(text)
|
170 |
text = '\n'.join(text)
|
170 |
g.publish('audit', 'forgemail.send_email', {
|
171 |
g.publish('audit', 'forgemail.send_email', {
|
171 |
'destinations':[str(user_id)],
|
172 |
'destinations':[str(user_id)],
|
172 |
'from':from_address,
|
173 |
'from':from_address,
|
173 |
'reply_to':from_address,
|
174 |
'reply_to':reply_to_address,
|
174 |
'subject':subject,
|
175 |
'subject':subject,
|
175 |
'message_id':h.gen_message_id(),
|
176 |
'message_id':h.gen_message_id(),
|
176 |
'text':text},
|
177 |
'text':text},
|
177 |
serializer='pickle')
|
178 |
serializer='pickle')
|
178 |
|
179 |
|
|
... |
|
... |
203 |
name = 'mailbox'
|
204 |
name = 'mailbox'
|
204 |
unique_indexes = [
|
205 |
unique_indexes = [
|
205 |
('user_id', 'project_id', 'app_config_id',
|
206 |
('user_id', 'project_id', 'app_config_id',
|
206 |
'artifact_index_id', 'topic', 'is_flash'),
|
207 |
'artifact_index_id', 'topic', 'is_flash'),
|
207 |
]
|
208 |
]
|
|
|
209 |
indexes = [
|
|
|
210 |
('project_id', 'artifact_index_id') ]
|
208 |
_id = FieldProperty(S.ObjectId)
|
211 |
_id = FieldProperty(S.ObjectId)
|
209 |
user_id = ForeignIdProperty('User', if_missing=lambda:c.user._id)
|
212 |
user_id = ForeignIdProperty('User', if_missing=lambda:c.user._id)
|
210 |
project_id = ForeignIdProperty('Project', if_missing=lambda:c.project._id)
|
213 |
project_id = ForeignIdProperty('Project', if_missing=lambda:c.project._id)
|
211 |
app_config_id = ForeignIdProperty('AppConfig', if_missing=lambda:c.app.config._id)
|
214 |
app_config_id = ForeignIdProperty('AppConfig', if_missing=lambda:c.app.config._id)
|
212 |
|
215 |
|