collectiveidea / tinder

Tinder is a Ruby API for interfacing with Campfire, the 37Signals chat application.
MIT License
255 stars 91 forks source link

find_room_by_name returning nil #75

Closed ryankbales closed 9 years ago

ryankbales commented 9 years ago

The following code in my endpoint was working great a few weeks ago. Code has not changed and now it is returning nil.

    campfire = Tinder::Campfire.new 'subdomain', :token => 'mytoken'
    room = campfire.find_room_by_name 'RoomName'

When I inspect the campfire.rooms I get:

   #<Tinder::Room:0x007fd06a1bb8d0
  @connection=
   #<Tinder::Connection:0x007fd06a1c9b88
    @options={:ssl=>true, :proxy=>nil, :token=>"mytoken"},
    @subdomain="subdomain",
    @token="mytoken",
    @uri=#<URI::HTTPS:0x007fd06a1c97c8 URL:https://subdomain.campfirenow.com>>,
  @id="room_id",
  @loaded=false,
  @name=nil>,

As you can see this one instance of a room object is returning nil for the room attribute. Our group has several rooms, and the weird thing is, the first three return an actual value for the @name attribute where the rest just return nil as is the room that the original query was looking for. I have an open ticket with Campfire, however they mentioned to check you the Tinder team to have you evaluate as well, for they have not changed anything in their API and our user database still lists the correct data for the room we are trying to use. Please let me know if you need more info. Thanks.

ryankbales commented 9 years ago

When I curl the API I get a clean json response with the data I need, so I am thinking this is a Tinder glitch?

danielmorrison commented 9 years ago

Ryan, I haven't be able to look into this yet, but is there anytime interesting about the room name? Special characters or something?

ryankbales commented 9 years ago

'F-EWE' is the room name, and was working just fine until a few weeks ago.

ryankbales commented 9 years ago

This has magically started working again and nothing was changed on my end. I guess we can close the issue. Thanks again.