Backend sends this payload when it receives new message from legacy network which should be forwarded to XMPP user.
|_. Variable|_. Description|
|userName| JID of XMPP user|
|buddyName| Name of the buddy in legacy network who sent the message. If the conversation is room, buddyName is name of the room.|
|message|Plain text message|
|xhtml|Message formatted using XHTML-IM XEP if available|
|nickname| If the conversation is room, this is the nickname of user who sent the original message|
|carbon| If set, the message is a carbon copy of our own message sent in a different legacy network client. It should be treated as a message FROM us, not TO us|
/// Call this function when user connected the legacy network and is logged in.
/// \param user XMPP JID of user for which this event occurs. You can get it from NetworkPlugin::handleLoginRequest(). (eg. "user%gmail.com@xmpp.domain.tld")
void handleConnected(const std::string &user);
/// Call this function when new message is received from legacy network for user.
/// \param user XMPP JID of user for which this event occurs. You can get it from NetworkPlugin::handleLoginRequest(). (eg. "user%gmail.com@xmpp.domain.tld")
/// \param legacyName Name of legacy network buddy or name of room. (eg. "user2@gmail.com")
/// \param message Plain text message.
/// \param nickname Nickname of buddy in room. Empty if it's normal chat message.
/// \param carbon If set, the message is a carbon copy of our own message, sent in a different legacy network client. The message should be treated as sent FROM us, not TO us.
/// Call this function when subject in room changed.
/// \param user XMPP JID of user for which this event occurs. You can get it from NetworkPlugin::handleLoginRequest(). (eg. "user%gmail.com@xmpp.domain.tld")
/// \param legacyName Name of room. (eg. "#spectrum")
/// \param message Subject message.
/// \param nickname Nickname of user who changed subject.
/// Call this function XMPP user's nickname changed.
/// \param user XMPP JID of user for which this event occurs. You can get it from NetworkPlugin::handleLoginRequest(). (eg. "user%gmail.com@xmpp.domain.tld")
include/transport/protocol.proto
➞
Show inline comments
@@ -68,24 +68,25 @@ message Buddies {
}
message ConversationMessage {
required string userName = 1;
required string buddyName = 2;
required string message = 3;
optional string nickname = 4;
optional string xhtml = 5;
optional string timestamp = 6;
optional bool headline = 7;
optional string id = 8;
optional bool pm = 9;
optional bool carbon = 10;
}
message Room {
required string userName = 1;
required string nickname = 2;
required string room = 3;
optional string password = 4;
}
message RoomList {
repeated string room = 1;
repeated string name = 2;
libtransport/Conversation.cpp
➞
Show inline comments
@@ -15,36 +15,49 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA