Compare commits
No commits in common. "9ac1e9706f65d737d60c5991fbc53d4642d52414" and "9395226c5f14f7c1e9a4a8f1bfb3186a92e7e6b6" have entirely different histories.
9ac1e9706f
...
9395226c5f
21 changed files with 32 additions and 9544 deletions
|
@ -1,26 +0,0 @@
|
||||||
Subject: test
|
|
||||||
From: test1@test
|
|
||||||
To: test2@test
|
|
||||||
Message-ID: <1@test>
|
|
||||||
Content-Type: multipart/alternative; boundary="abc"
|
|
||||||
|
|
||||||
--abc
|
|
||||||
Content-Type: text/plain; charset=utf-8
|
|
||||||
|
|
||||||
test1
|
|
||||||
|
|
||||||
--abc
|
|
||||||
Content-Type: image/jpeg; name="test.jpg"
|
|
||||||
Content-Disposition: inline; filename="test.jpg"
|
|
||||||
Content-Transfer-Encoding: base64
|
|
||||||
Content-ID: <1>
|
|
||||||
X-Attachment-Id: 1
|
|
||||||
|
|
||||||
dGVzdGltYWdl
|
|
||||||
|
|
||||||
--abc
|
|
||||||
Content-Type: text/plain; charset=utf-8
|
|
||||||
|
|
||||||
test2
|
|
||||||
|
|
||||||
--abc--
|
|
|
@ -1,5 +0,0 @@
|
||||||
Subject: test
|
|
||||||
From: <test1@test>
|
|
||||||
To: test2@test
|
|
||||||
Message-ID: <1@test>
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
Subject: test
|
|
||||||
From: test1@test
|
|
||||||
To: test2@test
|
|
||||||
Message-ID: <1@test>
|
|
||||||
Content-Type: text/html; charset=utf-8
|
|
||||||
Content-Transfer-Encoding: quoted-printable
|
|
||||||
|
|
||||||
hello =C3=A4=C3=B6=C3=BC
|
|
|
@ -1,6 +0,0 @@
|
||||||
Subject: test
|
|
||||||
From: test3@test
|
|
||||||
To: test4@localhost
|
|
||||||
Message-ID: <1@test>
|
|
||||||
|
|
||||||
test
|
|
|
@ -1,6 +0,0 @@
|
||||||
Subject: =?UTF-8?Q?suche_M=C3=BCtze?=
|
|
||||||
From: test3@test
|
|
||||||
To: test4@test
|
|
||||||
Message-ID: <1@test>
|
|
||||||
|
|
||||||
Text mit Quoted-Printable-Kodierung: =?utf-8?Q?=C3=A4=C3=B6=C3=BC=C3=9F?=
|
|
|
@ -1,7 +0,0 @@
|
||||||
Subject: test
|
|
||||||
From: test1@test
|
|
||||||
To: test2@test
|
|
||||||
Message-ID: <1@test>
|
|
||||||
Content-Type: text/html; charset=iso-8859-1
|
|
||||||
|
|
||||||
hello äöü
|
|
|
@ -1,21 +0,0 @@
|
||||||
Subject: test
|
|
||||||
From: test1@test
|
|
||||||
To: test2@test
|
|
||||||
Message-ID: <1@test>
|
|
||||||
Content-Type: multipart/mixed; boundary="abc"
|
|
||||||
|
|
||||||
--abc
|
|
||||||
Content-Type: text/plain; charset=utf-8
|
|
||||||
|
|
||||||
test1
|
|
||||||
|
|
||||||
--abc
|
|
||||||
Content-Type: image/jpeg; name="test.jpg"
|
|
||||||
Content-Disposition: attachment; filename="test.jpg"
|
|
||||||
Content-Transfer-Encoding: base64
|
|
||||||
Content-ID: <1>
|
|
||||||
X-Attachment-Id: 1
|
|
||||||
|
|
||||||
dGVzdGltYWdl
|
|
||||||
|
|
||||||
--abc--
|
|
|
@ -1,11 +0,0 @@
|
||||||
Subject: test
|
|
||||||
From: test1@test
|
|
||||||
To: test2@test
|
|
||||||
Message-ID: <1@test>
|
|
||||||
Content-Type: text/html; charset=utf-8
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<div>
|
|
||||||
<p>test</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -1,6 +0,0 @@
|
||||||
Subject: test =?utf-8?Q?=C3=A4?=
|
|
||||||
From: test3@test
|
|
||||||
To: test4@test
|
|
||||||
Message-ID: <1@test>
|
|
||||||
|
|
||||||
Text mit Quoted-Printable-Kodierung: =?utf-8?Q?=C3=A4=C3=B6=C3=BC=C3=9F?=
|
|
|
@ -1,6 +0,0 @@
|
||||||
Subject: =?utf-8?B?dGVzdA==?=
|
|
||||||
From: test3@test
|
|
||||||
To: test4@test
|
|
||||||
Message-ID: <1@test>
|
|
||||||
|
|
||||||
Text mit Base64-Kodierung: =?utf-8?B?w6TDtsO8w58=?=
|
|
|
@ -1,6 +0,0 @@
|
||||||
Subject: test
|
|
||||||
From: test1@test
|
|
||||||
To: test_event@localhost
|
|
||||||
Message-ID: <1@test>
|
|
||||||
|
|
||||||
test
|
|
|
@ -1,5 +0,0 @@
|
||||||
From: noreply@test
|
|
||||||
To: test2@test
|
|
||||||
Message-ID: <1@test>
|
|
||||||
|
|
||||||
test
|
|
|
@ -1,7 +0,0 @@
|
||||||
Subject: test
|
|
||||||
From: test1@test
|
|
||||||
To: test2@test
|
|
||||||
Message-ID: <1@test>
|
|
||||||
Content-Type: text/html; charset=utf-8
|
|
||||||
|
|
||||||
thank you =?utf-8?Q?=F0=9F=98=8A?=
|
|
|
@ -93,11 +93,11 @@ def make_reply(reply_email, references=None, event=None):
|
||||||
reply_email.save()
|
reply_email.save()
|
||||||
if references:
|
if references:
|
||||||
reply["References"] = " ".join(references)
|
reply["References"] = " ".join(references)
|
||||||
if reply_email.body != "":
|
|
||||||
reply.set_content(reply_email.body)
|
reply.set_content(reply_email.body)
|
||||||
|
|
||||||
return reply
|
return reply
|
||||||
else:
|
|
||||||
raise SpecialMailException("mail content emty")
|
|
||||||
|
|
||||||
async def send_smtp(message):
|
async def send_smtp(message):
|
||||||
await aiosmtplib.send(message, hostname="127.0.0.1", port=25, use_tls=False, start_tls=False)
|
await aiosmtplib.send(message, hostname="127.0.0.1", port=25, use_tls=False, start_tls=False)
|
||||||
|
@ -299,10 +299,10 @@ class LMTPHandler:
|
||||||
systemevent = await database_sync_to_async(SystemEvent.objects.create)(type='email received',
|
systemevent = await database_sync_to_async(SystemEvent.objects.create)(type='email received',
|
||||||
reference=email.id)
|
reference=email.id)
|
||||||
log.info(f"Created system event {systemevent.id}")
|
log.info(f"Created system event {systemevent.id}")
|
||||||
#channel_layer = get_channel_layer()
|
channel_layer = get_channel_layer()
|
||||||
#await channel_layer.group_send(
|
await channel_layer.group_send(
|
||||||
# 'general', {"type": "generic.event", "name": "send_message_to_frontend", "event_id": systemevent.id,
|
'general', {"type": "generic.event", "name": "send_message_to_frontend", "event_id": systemevent.id,
|
||||||
# "message": "email received"})
|
"message": "email received"})
|
||||||
log.info(f"Sent message to frontend")
|
log.info(f"Sent message to frontend")
|
||||||
if new and reply:
|
if new and reply:
|
||||||
log.info('Sending message to %s' % reply['To'])
|
log.info('Sending message to %s' % reply['To'])
|
||||||
|
|
|
@ -102,6 +102,12 @@ def manual_ticket(request, event_slug):
|
||||||
subject=request.data['name'],
|
subject=request.data['name'],
|
||||||
body=request.data['body'],
|
body=request.data['body'],
|
||||||
)
|
)
|
||||||
|
systemevent = SystemEvent.objects.create(type='email received', reference=email.id)
|
||||||
|
channel_layer = get_channel_layer()
|
||||||
|
async_to_sync(channel_layer.group_send)(
|
||||||
|
'general', {"type": "generic.event", "name": "send_message_to_frontend", "event_id": systemevent.id,
|
||||||
|
"message": "email received"}
|
||||||
|
)
|
||||||
|
|
||||||
return Response(IssueSerializer(issue).data, status=status.HTTP_201_CREATED)
|
return Response(IssueSerializer(issue).data, status=status.HTTP_201_CREATED)
|
||||||
|
|
||||||
|
@ -127,6 +133,12 @@ def add_comment(request, pk):
|
||||||
issue_thread=issue,
|
issue_thread=issue,
|
||||||
comment=request.data['comment'],
|
comment=request.data['comment'],
|
||||||
)
|
)
|
||||||
|
systemevent = SystemEvent.objects.create(type='comment added', reference=comment.id)
|
||||||
|
channel_layer = get_channel_layer()
|
||||||
|
async_to_sync(channel_layer.group_send)(
|
||||||
|
'general', {"type": "generic.event", "name": "send_message_to_frontend", "event_id": systemevent.id,
|
||||||
|
"message": "comment added"}
|
||||||
|
)
|
||||||
return Response(CommentSerializer(comment).data, status=status.HTTP_201_CREATED)
|
return Response(CommentSerializer(comment).data, status=status.HTTP_201_CREATED)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- HTTP_HOST=core
|
- HTTP_HOST=core
|
||||||
- DB_FILE=dev.db
|
- DB_FILE=dev.db
|
||||||
- DEBUG_MODE_ACTIVE=true
|
|
||||||
volumes:
|
volumes:
|
||||||
- ../../core:/code
|
- ../../core:/code
|
||||||
- ../testdata.py:/code/testdata.py
|
- ../testdata.py:/code/testdata.py
|
||||||
|
|
9399
web/package-lock.json
generated
9399
web/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -1,9 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<button @click.stop="handleClick" :disabled="disabled || inProgress">
|
<button @click.stop="handleClick" :disabled="disabled">
|
||||||
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"
|
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"
|
||||||
:class="{'d-none': !inProgress}"></span>
|
:class="{'d-none': !disabled}"></span>
|
||||||
<span class="ml-2" :class="{'d-none': !inProgress}">In Progress...</span>
|
<span class="ml-2" :class="{'d-none': !disabled}">In Progress...</span>
|
||||||
<span :class="{'d-none': inProgress}"><slot></slot></span>
|
<span :class="{'d-none': disabled}"><slot></slot></span>
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ export default {
|
||||||
name: 'AsyncButton',
|
name: 'AsyncButton',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
inProgress: false,
|
disabled: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
@ -21,21 +21,17 @@ export default {
|
||||||
type: Function,
|
type: Function,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
disabled: {
|
|
||||||
type: Boolean,
|
|
||||||
required: false,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async handleClick() {
|
async handleClick() {
|
||||||
if (this.task && typeof this.task === 'function') {
|
if (this.task && typeof this.task === 'function') {
|
||||||
this.inProgress = true;
|
this.disabled = true;
|
||||||
try {
|
try {
|
||||||
await this.task();
|
await this.task();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
} finally {
|
} finally {
|
||||||
this.inProgress = false;
|
this.disabled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<textarea placeholder="add comment..." v-model="newComment"
|
<textarea placeholder="add comment..." v-model="newComment"
|
||||||
class="form-control">
|
class="form-control">
|
||||||
</textarea>
|
</textarea>
|
||||||
<AsyncButton class="btn btn-secondary float-right" :task="addCommentAndClear" :disabled="!newComment">
|
<AsyncButton class="btn btn-secondary float-right" :task="addCommentAndClear">
|
||||||
<font-awesome-icon icon="comment"/>
|
<font-awesome-icon icon="comment"/>
|
||||||
Save Comment
|
Save Comment
|
||||||
</AsyncButton>
|
</AsyncButton>
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
<div>
|
<div>
|
||||||
<textarea placeholder="reply mail..." v-model="newMail" class="form-control">
|
<textarea placeholder="reply mail..." v-model="newMail" class="form-control">
|
||||||
</textarea>
|
</textarea>
|
||||||
<AsyncButton class="btn btn-primary float-right" :task="sendMailAndClear" :disabled="!newMail">
|
<AsyncButton class="btn btn-primary float-right" :task="sendMailAndClear">
|
||||||
<font-awesome-icon icon="envelope"/>
|
<font-awesome-icon icon="envelope"/>
|
||||||
Send Mail
|
Send Mail
|
||||||
</AsyncButton>
|
</AsyncButton>
|
||||||
|
|
Loading…
Add table
Reference in a new issue