Skip to content

Commit 95c0a2e

Browse files
authored
Merge pull request #1 from sharpkeen/sharpkeen-patch-1_system-update
Update plugin.rb
2 parents ecc3a3c + 279dee5 commit 95c0a2e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

plugin.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,14 @@ def send_pm(title, text, user)
160160
log_command("closed a topic", "https://forum.codewizardshq.com/t/#{post.topic_id}", post.user.username)
161161
PostDestroyer.new(Discourse.system_user, post).destroy
162162
end
163+
elsif raw[8, 11] == "code_sample" then
164+
text = "Hello" + topic.user.username + ", please refer to this topic for posting your code sample. https://forum.codewizardshq.com/t/how-to-post-code-samples/21423/1"
165+
create_post(topic.id, text)
166+
log_command("received code_sample message", "https://forum.codewizardshq.com/t/#{topic.topic_id}", topic.user.username)
167+
elsif raw[8,12] == "project_link" then
168+
text = "Hello" + topic.user.username + ", please refer to this topic for posting the link to your project. https://forum.codewizardshq.com/t/how-to-post-project-links/21426/1"
169+
create_post(topic.id, text)
170+
log_command("received project_link message", "https://forum.codewizardshq.com/t/#{topic.topic_id}", topic.user.username)
163171
elsif raw[8, 6] == "remove" then
164172
if (!post.user.primary_group_id.nil? && group.name == "Helpers") then
165173
first_reply = Post.find_by(topic_id: post.topic_id, post_number: 2)

0 commit comments

Comments
 (0)