Skip to content

Commit

Permalink
fix #471
Browse files Browse the repository at this point in the history
Pade Converse does not load when jitsi meet is set to root
  • Loading branch information
deleolajide committed Mar 19, 2024
1 parent 08b36bc commit 68a041f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ <h1>

<p><b>1.8.1</b> -- <i>April 30, 2024</i></p>
<ul>
<li></li>
<li>Fixed <a href="https://github.com/igniterealtime/openfire-pade-plugin/pull/471">Issue #471 - Pade Converse does not load when jitsi meet is set to root</a></li>
</ul>

<p><b>1.8.0</b> -- <i>March 18, 2024</i></p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ protected boolean containsExcludedExtension( HttpServletRequest request )
if (uri.contains("/win-sso")) return true;
if (uri.contains("/dashboard")) return true;
if (uri.contains("/apps")) return true;

if (uri.contains("/pade")) return true;

return false;
}

Expand Down
14 changes: 10 additions & 4 deletions src/java/org/jivesoftware/openfire/plugin/ofmeet/OfMeetPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,10 @@ protected void loadPublicWebApp() throws Exception

HttpBindManager.getInstance().addJettyHandler( jvbWsContext );
Log.info( "Initialized public web socket for /colibri-ws web socket" );

OFMeetConfig config = new OFMeetConfig();

publicWebApp = new WebAppContext(pluginDirectory.getPath() + "/classes/jitsi-meet", new OFMeetConfig().getWebappContextPath());
publicWebApp = new WebAppContext(pluginDirectory.getPath() + "/classes/jitsi-meet", config.getWebappContextPath());
publicWebApp.setClassLoader(this.getClass().getClassLoader());
final List<ContainerInitializer> initializers4 = new ArrayList<>();
initializers4.add(new ContainerInitializer(new JettyJasperInitializer(), null));
Expand All @@ -450,12 +452,16 @@ protected void loadPublicWebApp() throws Exception
Log.debug( "Initialized public web application", publicWebApp.toString() );

File source = new File(pluginDirectory.getPath() + "/classes/docs");
File dest = new File(JiveGlobals.getHomeDirectory() + File.separator + "resources" + File.separator + "spank" + File.separator + "pade");
File destination = new File(JiveGlobals.getHomeDirectory() + "/resources/spank/pade");

if ("/".equals(config.getWebappContextPath())) {
destination = new File(pluginDirectory.getPath() + "/classes/jitsi-meet/pade");
}

try {
FileUtils.copyDirectory(source, dest);
FileUtils.copyDirectory(source, destination);
} catch (IOException e) {
Log.error("Unable to copt pade web app folder", e);
Log.error("Unable to copy pade web app folder from " + source + " to " + destination, e);
}
}

Expand Down

0 comments on commit 68a041f

Please sign in to comment.