Geolocation eingefeatured
This commit is contained in:
parent
5da920a77b
commit
0b9682b55d
6
bot.rb
6
bot.rb
|
@ -33,10 +33,10 @@ $current_status = res.body.to_s.strip
|
|||
# If status differs from last time checked, put the announcement
|
||||
if (last_status != $current_status)
|
||||
if ($current_status == "offline")
|
||||
tweet = "Der Raum ist jetzt OFFLINE."
|
||||
tweet = "Der Raum ist jetzt OFFEN. #ctdo"
|
||||
status = "offline"
|
||||
elsif ($current_status == "online")
|
||||
tweet = "Der Raum ist jetzt ONLINE."
|
||||
tweet = "Der Raum ist jetzt GESCHLOSSEN. #ctdo."
|
||||
status = "online"
|
||||
else
|
||||
tweet = "Raumstatus UNBEKANNT."
|
||||
|
@ -44,5 +44,5 @@ if (last_status != $current_status)
|
|||
end
|
||||
$config['worker']['last_status'] = status
|
||||
File.open(CONFIG_FILE, 'w') { |f| YAML.dump($config, f) }
|
||||
client.update(tweet)
|
||||
client.update(tweet, {:lat => "51.527611", :lon => "7.464944", :display_coordinates => "true"})
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue