Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User guide #37

Merged
merged 3 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions public/src/modules/quickreply.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,13 @@
}

const replyMsg = components.get('topic/quickreply/text').val();
const replyAt = $('#replyAt').val(); // Capture the scheduled date and time

Check failure on line 61 in public/src/modules/quickreply.js

View workflow job for this annotation

GitHub Actions / test

Multiple spaces found before '// Capture the...'
const isAnon = components.get('topic/quickreply/anonymousCheckbox').is(':checked');
const replyData = {
tid: ajaxify.data.tid,
handle: isAnon ? 'anonymous' : undefined,
content: replyMsg,
scheduledDate: replyAt || null // Add the scheduled date to the request if it exists

Check failure on line 67 in public/src/modules/quickreply.js

View workflow job for this annotation

GitHub Actions / test

Multiple spaces found before '// Add the sch...'

Check failure on line 67 in public/src/modules/quickreply.js

View workflow job for this annotation

GitHub Actions / test

Missing trailing comma
};
const replyLen = replyMsg.length;
if (replyLen < parseInt(config.minimumPostLength, 10)) {
Expand All @@ -71,12 +73,17 @@
return alerts.error('[[error:content-too-long, ' + config.maximumPostLength + ']]');
}

console.log("Sending reply data to backend:", replyData);

Check failure on line 76 in public/src/modules/quickreply.js

View workflow job for this annotation

GitHub Actions / test

Strings must use singlequote


ready = false;
api.post(`/topics/${ajaxify.data.tid}`, replyData, function (err, data) {
ready = true;
if (err) {
return alerts.error(err);
}
console.log("Response from backend:", data);

Check failure on line 85 in public/src/modules/quickreply.js

View workflow job for this annotation

GitHub Actions / test

Strings must use singlequote

if (data && data.queued) {
alerts.alert({
type: 'success',
Expand Down
Empty file added userGuide.md
Empty file.
Loading