Offline Messages

There are many instances when two OpenBazaar users cannot directly communicate through our messaging system (libp2p). A system for exchanging offline messages through the OpenBazaar network was devised to store messages on the network temporarily for retrieval later. This enables features like allowing OpenBazaar merchants to take orders while offline and users to send chat messages to friends when they aren’t online.

How it Works

Let’s walk through a typical message scenario: sending a chat message.

	MessageId: <BASE58(message ID)>,
	Subject:   <subject>,
	Message:   <body>,
	Timestamp: <timestamp>,
	Flag:      <TYPING OR MESSAGE>,

If sending the online message fails the server will attempt to send it as an offline message. The following outlines this process:

  Message: <message_protobuf>,
  Pubkey: <public_key>,
  Signature: <signature>