Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (18 sloc) 556 Bytes
# name: Hidden Private Messages
# about: Disables updating`last_posted_at ` when a user sends a private message
# version: 0.1
# authors: Roragok
# url: https://github.com/Roragok/discourse-hidden-private-messages
class ::PostCreator
module HiddenPrivateMessagesPostCreator
def update_user_counts
time = @user.last_posted_at
unless @post.topic.private_message?
time = @post.created_at
end
super
@user.update_attributes(last_posted_at: time)
end
end
prepend HiddenPrivateMessagesPostCreator
end
You can’t perform that action at this time.