Libtransport: Fix 'register' command in AdminInterface
This commit is contained in:
parent
cb26fb0258
commit
10f8f610d0
4 changed files with 15 additions and 2 deletions
|
@ -273,10 +273,10 @@ void AdminInterface::handleQuery(Swift::Message::ref message) {
|
||||||
res.jid = args[1];
|
res.jid = args[1];
|
||||||
res.uin = args[2];
|
res.uin = args[2];
|
||||||
if (args.size() == 3) {
|
if (args.size() == 3) {
|
||||||
res.password = args[3];
|
res.password = "";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
res.password = args[4];
|
res.password = args[3];
|
||||||
}
|
}
|
||||||
res.language = "en";
|
res.language = "en";
|
||||||
res.encoding = "utf-8";
|
res.encoding = "utf-8";
|
||||||
|
|
|
@ -396,4 +396,13 @@ void XMPPFrontend::handleCapsChanged(const Swift::JID& jid) {
|
||||||
onCapabilitiesReceived(jid, m_entityCapsManager->getCaps(jid));
|
onCapabilitiesReceived(jid, m_entityCapsManager->getCaps(jid));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string XMPPFrontend::getRegistrationFields() {
|
||||||
|
std::string fields = "Jabber ID";
|
||||||
|
// if (CONFIG_BOOL(m_config, "registration.needRegistration")) {
|
||||||
|
fields += "\n" + CONFIG_STRING(m_config, "registration.username_label") + "\n";
|
||||||
|
fields += CONFIG_STRING(m_config, "registration.password_label");
|
||||||
|
// }
|
||||||
|
return fields;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,6 +94,8 @@ namespace Transport {
|
||||||
return m_rawXML;
|
return m_rawXML;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string getRegistrationFields();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void handleConnected();
|
void handleConnected();
|
||||||
void handleConnectionError(const Swift::ComponentError &error);
|
void handleConnectionError(const Swift::ComponentError &error);
|
||||||
|
|
|
@ -18,10 +18,12 @@ target_link_libraries(spectrum2_manager transport ${APPLE_FRAMEWORKS})
|
||||||
endif()
|
endif()
|
||||||
INSTALL(TARGETS spectrum2_manager RUNTIME DESTINATION bin)
|
INSTALL(TARGETS spectrum2_manager RUNTIME DESTINATION bin)
|
||||||
|
|
||||||
|
IF(NOT EXISTS "/etc/spectrum2/spectrum_manager.cfg")
|
||||||
INSTALL(FILES
|
INSTALL(FILES
|
||||||
spectrum_manager.cfg
|
spectrum_manager.cfg
|
||||||
DESTINATION /etc/spectrum2
|
DESTINATION /etc/spectrum2
|
||||||
)
|
)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
INSTALL(DIRECTORY
|
INSTALL(DIRECTORY
|
||||||
html
|
html
|
||||||
|
|
Loading…
Add table
Reference in a new issue