diff options
| author | David Yip <yipdw@alumni.rose-hulman.edu> | 2006-04-01 23:48:12 +0000 |
|---|---|---|
| committer | dwyip <dwyip@users.sourceforge.net> | 2006-04-01 23:48:12 +0000 |
| commit | c5d60153b1e179d92ba684cbb697c1ed4ec72819 (patch) | |
| tree | c70831ab96b869ac27413ba689b39d849706dd04 /src | |
| parent | forgot to check if the knot exists (diff) | |
| download | inkscape-c5d60153b1e179d92ba684cbb697c1ed4ec72819.tar.gz inkscape-c5d60153b1e179d92ba684cbb697c1ed4ec72819.zip | |
added fix from Dale Harvey to expand incomplete JIDs specified in user
text input box
(bzr r397)
Diffstat (limited to 'src')
| -rw-r--r-- | src/ui/dialog/whiteboard-sharewithuser.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
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 <b>%1</b>"), jid); this->_sm->desktop()->messageStack()->flash(Inkscape::NORMAL_MESSAGE, msg.data()); if (this->_sfsbox.isSelected()) { |
