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

Some private chat history is better than none. #56

Open
deleolajide opened this issue Sep 27, 2019 · 3 comments
Open

Some private chat history is better than none. #56

deleolajide opened this issue Sep 27, 2019 · 3 comments

Comments

@deleolajide
Copy link
Member

@deleolajide deleolajide commented Sep 27, 2019

Private chat history via MAM is not working. My investigation found that the following code is failing. It returns feature not implemented to XMPP client (conversejs)

        this.iqDispatcher = new AbstractIQHandler(iqDispatcherName, null, iqDispatcherNamespace) {
            public IQ handleIQ(IQ packet) throws UnauthorizedException {
                if (!MonitoringPlugin.getInstance().isEnabled()) {
                    return error(packet,
                            PacketError.Condition.feature_not_implemented);
                }

                final IQHandler iqHandler = element2Handlers.get(packet
                        .getChildElement().getName());
                if (iqHandler != null) {
                    return iqHandler.handleIQ(packet);
                } else {
                    return error(packet,
                            PacketError.Condition.feature_not_implemented);
                }
            }
        };

I found that I can replace this with the following hack to get at least MAM:2 private chat

        this.iqDispatcher = new IQQueryHandler2();
deleolajide added a commit that referenced this issue Sep 27, 2019
guusdk added a commit that referenced this issue Sep 27, 2019
Existing code used an unqualified name to identify the correct IQ handler for a particular stanza. As MAM:1 and MAM:2 use the same element name, this leads to collisions.
mightymop pushed a commit to mightymop/openfire-monitoring-plugin that referenced this issue Dec 2, 2019
Existing code used an unqualified name to identify the correct IQ handler for a particular stanza. As MAM:1 and MAM:2 use the same element name, this leads to collisions.
@deleolajide

This comment has been minimized.

Copy link
Member Author

@deleolajide deleolajide commented Dec 3, 2019

This commit is not working reliably. It works on my dev PC with 1.8.0_144 Oracle Corporation -- Java HotSpot(TM) 64-Bit Server VM, but does not work on my production server with 1.8.0_222 Oracle Corporation -- OpenJDK 64-Bit Server VM

I had to revert back to

   this.iqDispatcher = new IQQueryHandler2();

To get a reliable result

@guusdk

This comment has been minimized.

Copy link
Member

@guusdk guusdk commented Dec 3, 2019

That's surprising. It's the change in key type (from String to QName) that's causing you issues? What issues are those?

@deleolajide

This comment has been minimized.

Copy link
Member Author

@deleolajide deleolajide commented Dec 3, 2019

It returns feature not implemented to XMPP client (conversejs). The change seems to fail on all my linux servers so far. Only works with my windows dev pc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.