aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/web_interface.rb
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-07-20 16:15:03 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-07-20 16:15:03 +0100
commit645c47d975e3c34a092acddf4a5f9420010755bc (patch)
tree6c667f44b01425efe6e7e4e10813bfe0cc082632 /lib/mauve/web_interface.rb
parent53f89ba450850990057883a92f89ed994563e4ab (diff)
* Added heartbeat to remote mauve
* Added URLs to messages * Added example configuration file * Added various docs * XMPP messages now XHTML and TXT * Handling of MUC reconnection a bit better.
Diffstat (limited to 'lib/mauve/web_interface.rb')
-rw-r--r--lib/mauve/web_interface.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/mauve/web_interface.rb b/lib/mauve/web_interface.rb
index 4594e10..4bb9517 100644
--- a/lib/mauve/web_interface.rb
+++ b/lib/mauve/web_interface.rb
@@ -22,7 +22,14 @@ module Mauve
def self._logger
Log4r::Logger.new(self.to_s)
end
-
+
+ #
+ # Generic URL for
+ #
+ def self.url_for(obj)
+ [Mauve::HTTPServer.instance.base_url, obj.class.to_s.split("::").last.downcase, obj.id.to_s].join("/")
+ end
+
use Rack::CommonLogger
use Rack::Chunked
use Rack::ContentLength
@@ -519,7 +526,6 @@ EOF
env['rack.errors'] = RackErrorsProxy.new(logger)
super(env)
end
-
- end
+ end
end