From 645c47d975e3c34a092acddf4a5f9420010755bc Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Wed, 20 Jul 2011 16:15:03 +0100 Subject: * 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. --- lib/mauve/web_interface.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lib/mauve/web_interface.rb') 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 -- cgit v1.2.1