|
a/Allura/allura/app.py |
|
b/Allura/allura/app.py |
|
... |
|
... |
250 |
def handle_message(self, topic, message):
|
250 |
def handle_message(self, topic, message):
|
251 |
'''Handle incoming email msgs addressed to this tool'''
|
251 |
'''Handle incoming email msgs addressed to this tool'''
|
252 |
pass
|
252 |
pass
|
253 |
|
253 |
|
254 |
def handle_artifact_message(self, artifact, message):
|
254 |
def handle_artifact_message(self, artifact, message):
|
255 |
# Find ancestor comment
|
255 |
# Find ancestor comment and thread
|
256 |
in_reply_to = message.get('in_reply_to', [])
|
|
|
257 |
if in_reply_to:
|
|
|
258 |
parent_id = in_reply_to[0]
|
|
|
259 |
else:
|
|
|
260 |
parent_id = None
|
|
|
261 |
thd = artifact.get_discussion_thread(message)
|
256 |
thd, parent_id = artifact.get_discussion_thread(message)
|
262 |
# Handle attachments
|
257 |
# Handle attachments
|
263 |
message_id = message['message_id']
|
258 |
message_id = message['message_id']
|
264 |
if message.get('filename'):
|
259 |
if message.get('filename'):
|
265 |
# Special case - the actual post may not have been created yet
|
260 |
# Special case - the actual post may not have been created yet
|
266 |
log.info('Saving attachment %s', message['filename'])
|
261 |
log.info('Saving attachment %s', message['filename'])
|