X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fui%2Fdialog%2Fwhiteboard-sharewithuser.cpp;h=ea7720f7dd7827e86461841c0951e727ba490fe6;hb=715835088c4183f700d3d56386bfc40ab7cacc54;hp=13dc61a5ecd046d81aa0053dab6f850614887e7e;hpb=6b15695578f07a3f72c4c9475c1a261a3021472a;p=inkscape.git diff --git a/src/ui/dialog/whiteboard-sharewithuser.cpp b/src/ui/dialog/whiteboard-sharewithuser.cpp index 13dc61a5e..ea7720f7d 100644 --- a/src/ui/dialog/whiteboard-sharewithuser.cpp +++ b/src/ui/dialog/whiteboard-sharewithuser.cpp @@ -165,6 +165,19 @@ WhiteboardShareWithUserDialogImpl::_respCallback(int resp) 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 %1"), jid); this->_sm->desktop()->messageStack()->flash(Inkscape::NORMAL_MESSAGE, msg.data()); if (this->_sfsbox.isSelected()) {