diff --git a/src/ui/dialog/whiteboard-sharewithuser.cpp b/src/ui/dialog/whiteboard-sharewithuser.cpp
index 13dc61a5ecd046d81aa0053dab6f850614887e7e..ebe91f0f3289b25bc95743cb28f91a532858544e 100644 (file)
void
WhiteboardShareWithUserDialogImpl::setSessionManager()
{
- this->_desktop = SP_ACTIVE_DESKTOP;
- this->_sm = SP_ACTIVE_DESKTOP->whiteboard_session_manager();
+ this->_desktop = this->getDesktop();
+ this->_sm = this->_desktop->whiteboard_session_manager();
}
case SHARE:
{
Glib::ustring jid = this->_jid.get_text();
+
+ // Check that the JID is in the format user@host/resource
+ if (jid.find("@", 0) == Glib::ustring::npos) {
+ jid += "@";
+ jid += lm_connection_get_server(this->_sm->session_data->connection);
+ }
+
+ if (jid.find("/", 0) == Glib::ustring::npos) {
+ jid += "/" + static_cast< Glib::ustring >(RESOURCE_NAME);
+ }
+
+ g_log(NULL, G_LOG_LEVEL_DEBUG, "Full JID is %s", jid.c_str());
+
Glib::ustring msg = String::ucompose(_("Sending whiteboard invitation to <b>%1</b>"), jid);
this->_sm->desktop()->messageStack()->flash(Inkscape::NORMAL_MESSAGE, msg.data());
if (this->_sfsbox.isSelected()) {