mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
store ip address and current user with incoming links
make links long an readable in share dialog
This commit is contained in:
@ -11,8 +11,7 @@ class PostsController < ApplicationController
|
||||
|
||||
def short_link
|
||||
post = Post.find(params[:post_id].to_i)
|
||||
user = User.select(:id).where(id: params[:user_id].to_i).first
|
||||
IncomingLink.add(request, user ? user.id : nil)
|
||||
IncomingLink.add(request,current_user)
|
||||
redirect_to post.url
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user