Skip to content

Commit

Permalink
Use the REST API for file access instead of olddock's custom URL.
Browse files Browse the repository at this point in the history
Verified that this actually works.
  • Loading branch information
Otto Hilska committed Mar 28, 2013
1 parent 92c0fd7 commit ff98112
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/events/file_event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class FileEvent < FlowdockEvent

def render
(organization, flow) = @target.visible_name.split('/')
url = "https://#{organization}.#{IrcServer::FLOWDOCK_DOMAIN}#{@message['content']['path']}"
url = "https://www.#{IrcServer::FLOWDOCK_DOMAIN}/rest#{@message['content']['path']}"
render_privmsg(@user.irc_host, @target.irc_id, url)
end

Expand Down
2 changes: 1 addition & 1 deletion spec/flowdock_event_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
it "should render file event" do
event = FlowdockEvent.from_message(@irc_connection, message_hash('file_event'))
event.valid?.should be_true
event.render.should == ":Otto!otto@example.com PRIVMSG #irc/ottotest :https://irc.flowdock.com/flows/irc/ottotest/files/Sse2n5VKLlLeafMsjFLuxA/globe.rb"
event.render.should == ":Otto!otto@example.com PRIVMSG #irc/ottotest :https://www.flowdock.com/rest/flows/irc/ottotest/files/Sse2n5VKLlLeafMsjFLuxA/globe.rb"
end

describe "team inbox messages" do
Expand Down

0 comments on commit ff98112

Please sign in to comment.