mirror of
https://github.com/lxsang/antd-web-apps
synced 2024-12-26 17:38:21 +01:00
commit
d96a9c699e
@ -57,6 +57,10 @@
|
||||
target: "quick_talk_comment_thread",
|
||||
api_uri: "https://chat.iohub.dev/comment",
|
||||
uri: "<?=url?>",
|
||||
author: {
|
||||
first: "mrsang",
|
||||
last: "iohub.dev"
|
||||
},
|
||||
onload: function(){
|
||||
renderMathInElement($("#desktop")[0]);
|
||||
$('pre code').each(function(i, block) {
|
||||
|
@ -149,6 +149,10 @@ local url = __main__:get("url")
|
||||
target: "quick_talk_comment_thread",
|
||||
api_uri: "https://chat.iohub.dev/comment",
|
||||
uri: "<?=url?>",
|
||||
author: {
|
||||
first: "mrsang",
|
||||
last: "iohub.dev"
|
||||
},
|
||||
onload: function(){
|
||||
renderMathInElement($("#book")[0]);
|
||||
$('pre code').each(function(i, block) {
|
||||
|
@ -164,6 +164,10 @@ class QuickTalk {
|
||||
content: ta.value,
|
||||
},
|
||||
};
|
||||
if (this.options.author) {
|
||||
data.author =
|
||||
this.options.author.first + "@" + this.options.author.last;
|
||||
}
|
||||
this.request(this.options.api_uri + "/post", data, (ret) => {
|
||||
if (ret.result) {
|
||||
// TODO: more check goes here
|
||||
|
@ -111,7 +111,14 @@ function CommentController:post(...)
|
||||
rq.comment.id = self.comment.db:lastInsertID()
|
||||
|
||||
rq.comment.content = process_md(rq.comment.content)
|
||||
|
||||
-- notify the author
|
||||
if rq.author then
|
||||
sendmail(rq.author, rq.comment.name ..
|
||||
" has commented on one of your pages",
|
||||
rq.comment.name .. " has commented on your page: " ..
|
||||
rq.page.uri ..
|
||||
".\nBest regards,\nEmail automatically sent by QuickTalk API")
|
||||
end
|
||||
-- send mail to all users of current page
|
||||
local cmts, cmti = self.comment:select("MIN(id) as id,email",
|
||||
"pid=" .. rq.comment.pid ..
|
||||
@ -125,7 +132,7 @@ function CommentController:post(...)
|
||||
rq.comment.name ..
|
||||
" has written something on a page that you've commented. \nPlease visit this page: " ..
|
||||
rq.page.uri ..
|
||||
" for updates on the discussion.\nBest regard,\nEmail automatically sent by QuickTalk API")
|
||||
" for updates on the discussion.\nBest regards,\nEmail automatically sent by QuickTalk API")
|
||||
end
|
||||
end
|
||||
rq.comment.email = ""
|
||||
|
Loading…
Reference in New Issue
Block a user