Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement server-side login Jitsi Meet Polls #403

Open
deleolajide opened this issue Mar 15, 2022 · 12 comments
Open

Implement server-side login Jitsi Meet Polls #403

deleolajide opened this issue Mar 15, 2022 · 12 comments

Comments

@deleolajide
Copy link
Member

Port code from Lua to Java

See https://github.com/jitsi/jitsi-meet/blob/68eb0795eb6a87189e27001d2e95c701536dac3f/resources/prosody-plugins/mod_polls.lua

@gjaekel
Copy link
Contributor

gjaekel commented Mar 24, 2022

Big problems:

  • There's no name (owner?) shown for the polls
  • How to close and get rid of messages in the WebClients user interface?
  • Polls seems to be persisted at room properties. But the opened polls propagate to every existing room, esp. to the pinned ones.

Up to now, in our production installation, there actually three "nonsense votings" lingering around from some users quick evaluation. How to get rid of them at all, maybe by an SQL statement?

@gjaekel gjaekel reopened this Mar 24, 2022
@gjaekel
Copy link
Contributor

gjaekel commented Mar 24, 2022

BTW: I get an exception at the AdminUI at plugins/rawpropertyeditor/groupchat-propertiesplugin.jsp on every empty(?) pinned room, but this is an OpenFire / RawProperty-Plugin issue:

java.lang.IncompatibleClassChangeError: Found class org.jivesoftware.openfire.muc.MUCRoom, but interface was expected
	at org.jivesoftware.openfire.plugin.RawPropertyEditorPlugin.getAndCheckGroupChat(RawPropertyEditorPlugin.java:129)
	at org.jivesoftware.openfire.plugin.RawPropertyEditorPlugin.getGroupChatProperties(RawPropertyEditorPlugin.java:140)
	at org.jivesoftware.openfire.plugin.rawpropertyeditor.groupchat_002dpropertiesplugin_jsp._jspService(groupchat_002dpropertiesplugin_jsp.java:156)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:71)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.jivesoftware.openfire.container.PluginServlet.handleJSP(PluginServlet.java:462)
	at org.jivesoftware.openfire.container.PluginServlet.service(PluginServlet.java:122)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1459)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
	at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1626)
	at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:226)
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
	at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:234)

Solved by upgrading to V1.0.2 of the RawPropertyEditor-Plugin

@gjaekel
Copy link
Contributor

gjaekel commented Mar 24, 2022

Observation: I found the poll data entries also at the special "focus" room. I delete them there and since this it seems that a client starts with an empty poll panel at least on a new room.

@deleolajide
Copy link
Member Author

deleolajide commented Mar 24, 2022

The implementation of Polls by Jitsi is meant for temporary rooms that get deleted after everyone leaves the room. Using Polls with persistent rooms in Openfire will require additional logic to clean up polls that have expired and adding an owner value to identify who created it. This is additional work and should be a new issue.

@gjaekel
Copy link
Contributor

gjaekel commented Mar 24, 2022

But for some reason the "three existing" polls appear at every room, even non-sticky new ones. This was reported by one of our users and verified by me.

@deleolajide
Copy link
Member Author

But for some reason the "three existing" polls appear at every room, even non-sticky new one

Unfortunately, I can't reproduce this. MUC Properties are cached by Openfire. You might want to reduce the expiry time otherwise, the next time a non-sticky room is used, the non-expired polls will be sent to each participant when they join.

I have added additional code for making sure focus user is not sent polls data

c0daaf8

@gjaekel
Copy link
Contributor

gjaekel commented Mar 24, 2022

Thank you in advance. Unfortunately I had have no time yet to investigate how to actually produce the issue. Will report about later ...

@gjaekel
Copy link
Contributor

gjaekel commented Mar 25, 2022

I extracted lib/pade-1.6.3-SNAPSHOT.jar from Snapshot 20220324.143502-29 and put it the production environment. I double-checked to use the latest code by decompiling the class file OfMeetPlugin.class. But I see no improvement:

  • The poll stay persistent and appear in every room, even "sure never used before" ones.
  • The creators name field is empty.
  • It is listed within the properties of the special room ofmeet. Data is e.g.
jitsi.meet.polls.ha2s137drn
{"senderId":"618974af","senderName":"Jäkel, Guido","question":"Wie ist die Antwort?","answers":[{"voters":{},"name":"36"},{"voters":{"618974af":"Jäkel, Guido"},"name":"42"}],"id":"ha2s137drn"}
  • The voting disappears overall if deleting this.

@gjaekel
Copy link
Contributor

gjaekel commented Mar 25, 2022

Observation: Using the properties URL from history, e.g. https://<admin-ui>/plugins/rawpropertyeditor/groupchat-propertiesplugin.jsp?roomJID=_%40conference.xmpp.dnb.de&create=false, the property with the vote data is still accessible, even it the room has been left and closed down, i.e. disappear from the overview. And on re-using this room name, the vote also re-appear. Note that this are non-sticky rooms.

@deleolajide
Copy link
Member Author

It might make sense to delete the poll when the room is destroyed in Openfire

@deleolajide
Copy link
Member Author

This commit will remove all room polls when the room is destroyed. However, the data is cached and the poll will still be available if room is re-used before the cache expires

@gjaekel
Copy link
Contributor

gjaekel commented Mar 25, 2022

Can't believe: The call of props.remove(key) will not clear it from the cache?!? Then props.put(key,"") should made it unusable at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants