### Start Tinode MySQL Single-Instance Source: https://github.com/tinode/chat/blob/master/docker/docker-compose/README.md Brings up a single-instance Tinode setup with a MySQL backend. ```bash docker-compose -f single-instance.yml up -d ``` -------------------------------- ### Start Tinode RethinkDB Single-Instance Source: https://github.com/tinode/chat/blob/master/docker/docker-compose/README.md Brings up a single-instance Tinode setup with a RethinkDB backend using an override file. ```bash docker-compose -f single-instance.yml -f single-instance.rethinkdb.yml up -d ``` -------------------------------- ### Start Tinode PostgreSQL Single-Instance Source: https://github.com/tinode/chat/blob/master/docker/docker-compose/README.md Brings up a single-instance Tinode setup with a PostgreSQL backend using an override file. ```bash docker-compose -f single-instance.yml -f single-instance.postgres.yml up -d ``` -------------------------------- ### Start Tinode MongoDB Single-Instance Source: https://github.com/tinode/chat/blob/master/docker/docker-compose/README.md Brings up a single-instance Tinode setup with a MongoDB backend using an override file. ```bash docker-compose -f single-instance.yml -f single-instance.mongodb.yml up -d ``` -------------------------------- ### Start MySQL Server Source: https://github.com/tinode/chat/blob/master/INSTALL.md Command to start the MySQL database server. ```bash mysql.server start ``` -------------------------------- ### Start Individual Tinode Server Source: https://github.com/tinode/chat/blob/master/docker/docker-compose/README.md Starts only the Tinode server component in a single-instance MySQL setup. Useful for testing or specific component management. ```bash docker-compose -f single-instance.yml up -d tinode-0 ``` -------------------------------- ### Start Tinode MySQL Cluster Source: https://github.com/tinode/chat/blob/master/docker/docker-compose/README.md Brings up a 3-node cluster Tinode setup with a MySQL backend. ```bash docker-compose -f cluster.yml up -d ``` -------------------------------- ### Install Flask Source: https://github.com/tinode/chat/blob/master/rest-auth/README.md Install the Flask library, which is required for the REST authenticator server. ```bash pip install flask ``` -------------------------------- ### Setup Virtual Environment and Upgrade Pip Source: https://github.com/tinode/chat/blob/master/chatbot/python/README.md Installs and activates a virtual environment, then upgrades pip within that environment. Useful if you cannot upgrade pip globally. ```bash $ python -m pip install virtualenv $ virtualenv venv $ source venv/bin/activate $ python -m pip install --upgrade pip ``` -------------------------------- ### Install Tinode Server and DB Initializer for All Databases Source: https://github.com/tinode/chat/blob/master/INSTALL.md Installs the Tinode server and its database initializer with support for all listed database adapters. ```bash go install -tags "mysql rethinkdb mongodb postgres" github.com/tinode/chat/server@latest go install -tags "mysql rethinkdb mongodb postgres" github.com/tinode/chat/tinode-db@latest ``` -------------------------------- ### Start MongoDB Server Source: https://github.com/tinode/chat/blob/master/INSTALL.md Command to start the MongoDB server. Ensure it runs as a single node replicaset. ```bash mongod ``` -------------------------------- ### Run Tsung Load Test Source: https://github.com/tinode/chat/blob/master/loadtest/README.md Use this command to start the load test configured with tsung.xml. Ensure Tsung is installed and tinode.beam is available. ```bash tsung -f ./tsung.xml start ``` -------------------------------- ### Start PostgreSQL Server Source: https://github.com/tinode/chat/blob/master/INSTALL.md Command to start the PostgreSQL database server using pg_ctl. ```bash pg_ctl start ``` -------------------------------- ### Start Tinode MongoDB Cluster Source: https://github.com/tinode/chat/blob/master/docker/docker-compose/README.md Brings up a 3-node cluster Tinode setup with a MongoDB backend using an override file. ```bash docker-compose -f cluster.yml -f cluster.mongodb.yml up -d ``` -------------------------------- ### Start Tinode PostgreSQL Cluster Source: https://github.com/tinode/chat/blob/master/docker/docker-compose/README.md Brings up a 3-node cluster Tinode setup with a PostgreSQL backend using an override file. ```bash docker-compose -f cluster.yml -f cluster.postgres.yml up -d ``` -------------------------------- ### Initialize Tinode Database Source: https://github.com/tinode/chat/blob/master/INSTALL.md Run the DB initializer for Tinode. This only needs to be done once per installation. ```bash $GOPATH/bin/tinode-db -config=./tinode-db/tinode.conf ``` -------------------------------- ### Start Tinode RethinkDB Cluster Source: https://github.com/tinode/chat/blob/master/docker/docker-compose/README.md Brings up a 3-node cluster Tinode setup with a RethinkDB backend using an override file. ```bash docker-compose -f cluster.yml -f cluster.rethinkdb.yml up -d ``` -------------------------------- ### Install Tinode Server and DB Initializer for MySQL Source: https://github.com/tinode/chat/blob/master/INSTALL.md Installs the Tinode server and its database initializer for MySQL. Ensure MySQL 5.7+ with InnoDB is running. ```bash go install -tags mysql github.com/tinode/chat/server@latest go install -tags mysql github.com/tinode/chat/tinode-db@latest ``` -------------------------------- ### Install Tinode Server and DB Initializer for PostgreSQL Source: https://github.com/tinode/chat/blob/master/INSTALL.md Installs the Tinode server and its database initializer for PostgreSQL. Ensure PostgreSQL 13+ is running. ```bash go install -tags postgres github.com/tinode/chat/server@latest go install -tags postgres github.com/tinode/chat/tinode-db@latest ``` -------------------------------- ### Install Tinode Server and DB Initializer for MongoDB Source: https://github.com/tinode/chat/blob/master/INSTALL.md Installs the Tinode server and its database initializer for MongoDB. Ensure MongoDB 4.4+ is running. ```bash go install -tags mongodb github.com/tinode/chat/server@latest go install -tags mongodb github.com/tinode/chat/tinode-db@latest ``` -------------------------------- ### Install gRPC Tools Source: https://github.com/tinode/chat/blob/master/pbx/README.md Install the necessary Python packages for gRPC development, including grpcio, grpcio-tools, and googleapis-common-protos. ```bash python -m pip install grpcio grpcio-tools googleapis-common-protos ``` -------------------------------- ### Install Tinode Server and DB Initializer for RethinkDB Source: https://github.com/tinode/chat/blob/master/INSTALL.md Installs the Tinode server and its database initializer for RethinkDB. Note that RethinkDB support is deprecated. ```bash go install -tags rethinkdb github.com/tinode/chat/server@latest go install -tags rethinkdb github.com/tinode/chat/tinode-db@latest ``` -------------------------------- ### Install Chatbot Dependencies Source: https://github.com/tinode/chat/blob/master/chatbot/python/README.md Installs all necessary Python packages listed in the requirements.txt file. ```bash $ python -m pip install -r requirements.txt ``` -------------------------------- ### BN: Button URL Action Example Source: https://github.com/tinode/chat/blob/master/docs/drafty.md Illustrates how a button with 'act: url' constructs an HTTP GET request, appending name-value pairs, user ID, topic, and sequence ID to the reference URL. ```js https://www.example.com/path/?foo=bar&confirmation=some-value&uid=usrFsk73jYRR&topic=grpnG99YhENiQU&seq=3 ``` -------------------------------- ### Run Tinode Server Source: https://github.com/tinode/chat/blob/master/INSTALL.md Start the Tinode server. It can be run without any parameters. ```bash ./tinode ``` -------------------------------- ### MySQL Database Configuration Source: https://github.com/tinode/chat/blob/master/INSTALL.md Example configuration for connecting to a MySQL database. Ensure the DSN and 'parseTime=true' option are correctly set. ```json { "mysql": { "dsn": "root@tcp(localhost)/tinode?parseTime=true", "database": "tinode" } } ``` -------------------------------- ### Basic Docker Compose Up Command Source: https://github.com/tinode/chat/blob/master/docker/docker-compose/README.md Use this command to start Tinode with a specified configuration file. Override files can be added for different database backends. ```bash docker-compose -f [-f ] up -d ``` -------------------------------- ### Start RethinkDB Server Source: https://github.com/tinode/chat/blob/master/INSTALL.md Command to start the RethinkDB server in daemon mode, bound to all interfaces. ```bash rethinkdb --bind all --daemon ``` -------------------------------- ### Run REST Authenticator Server Source: https://github.com/tinode/chat/blob/master/rest-auth/README.md Run the Python script 'auth.py' to start the REST authenticator server. ```bash python auth.py ``` -------------------------------- ### Install Dependencies Source: https://github.com/tinode/chat/blob/master/tn-cli/README.md Installs the necessary Python dependencies for the Tinode command line client using pip. ```bash python -m pip install -r requirements.txt ``` -------------------------------- ### Install tinode_grpc Package Source: https://github.com/tinode/chat/blob/master/py_grpc/README.md Install the tinode_grpc Python package using pip. ```bash pip install tinode_grpc ``` -------------------------------- ### Store Configuration with MySQL Adapter Source: https://github.com/tinode/chat/blob/master/INSTALL.md Example configuration snippet specifying the use of the MySQL adapter in 'tinode.conf'. ```json { "store_config": { "use_adapter": "mysql" } } ``` -------------------------------- ### BN: Button Action 'note' Example Source: https://github.com/tinode/chat/blob/master/docs/drafty.md Example of a button action that sends a '{note}' message to the current topic. This functionality is not currently implemented. ```json { "what": "data", "data": { "mime": "text/x-drafty-fr", "val": { "seq": 3, "resp": { "confirmation": "some-value" } } } } ``` -------------------------------- ### BN: Button Action 'pub' Example Source: https://github.com/tinode/chat/blob/master/docs/drafty.md Example of a button action that sends a Drafty-formatted '{pub}' message to the current topic with form data as an attachment. ```json { "tp":"EX", "data":{ "mime":"text/x-drafty-fr", "val": { "seq": 3, "resp": { "confirmation": "some-value" } } } } ``` -------------------------------- ### Run Chatbot with Cookie File Source: https://github.com/tinode/chat/blob/master/chatbot/python/README.md Starts the chatbot using credentials stored in a cookie file. If a default '.tn-cookie' file exists, no parameters are needed. ```bash python chatbot.py ``` -------------------------------- ### Run Chatbot with Basic Authentication Source: https://github.com/tinode/chat/blob/master/chatbot/python/README.md Starts the chatbot using basic authentication with a specified username and password. Ensure the Tinode server is running first. ```bash python chatbot.py --login-basic=alice:alice123 ``` -------------------------------- ### Run Tinode with MySQL Backend Source: https://github.com/tinode/chat/blob/master/docker/README.md Starts the Tinode server container, mapping port 6060 and connecting to the 'tinode-net' network. This command is for the MySQL backend. ```bash $ docker run -p 6060:6060 -d --name tinode-srv --network tinode-net tinode/tinode-mysql:latest ``` -------------------------------- ### Run Tinode with PostgreSQL Backend Source: https://github.com/tinode/chat/blob/master/docker/README.md Starts the Tinode server container, mapping port 6060 and connecting to the 'tinode-net' network. This command is for the PostgreSQL backend. ```bash $ docker run -p 6060:6060 -d --name tinode-srv --network tinode-net tinode/tinode-postgres:latest ``` -------------------------------- ### Build for MySQL Source: https://github.com/tinode/chat/blob/master/tinode-db/README.md Build the tinode-db package with MySQL support. Use the -i flag to automatically install missing dependencies. ```bash go build -tags mysql go build -i -tags mysql ``` -------------------------------- ### Navigate to Tinode Source Directory Source: https://github.com/tinode/chat/blob/master/INSTALL.md Change to the Tinode source code directory. Replace 'X.XX.X' with your installed version. ```bash cd $GOPATH/pkg/mod/github.com/tinode/chat@vX.XX.X ``` -------------------------------- ### Shell Command Example: Diff Usage Source: https://github.com/tinode/chat/blob/master/chatbot/python/quotes.txt Illustrates the basic usage of the 'diff' command for comparing files or content. It's a common utility for identifying differences. ```shell diff: usage diff [whatever] etc. ``` -------------------------------- ### Link Preview Endpoint Source: https://github.com/tinode/chat/blob/master/docs/API.md Example of the URL for the link preview service. This service fetches content from a given URL to generate previews. ```http /v0/urlpreview?url=https%3A%2F%2Ftinode.co ``` -------------------------------- ### Run Tinode with MongoDB Backend Source: https://github.com/tinode/chat/blob/master/docker/README.md Starts the Tinode server container, mapping port 6060 and connecting to the 'tinode-net' network. This command is for the MongoDB backend. ```bash $ docker run -p 6060:6060 -d --name tinode-srv --network tinode-net tinode/tinode-mongodb:latest ``` -------------------------------- ### Build Tinode Server with Build Stamp Source: https://github.com/tinode/chat/blob/master/INSTALL.md Installs the Tinode server with a custom build stamp, useful for identifying the build version on the client. ```bash go install -tags mysql -ldflags "-X main.buildstamp=`date -u '+%Y%m%dT%H:%M:%SZ'`" github.com/tinode/chat/server@latest ``` -------------------------------- ### Run MySQL Docker Container Source: https://github.com/tinode/chat/blob/master/docker/README.md Starts a MySQL 5.7 or above Docker container on the 'tinode-net' network. Ensure the container name is 'mysql' for Tinode to connect. ```bash $ docker run --name mysql --network tinode-net --restart always --env MYSQL_ALLOW_EMPTY_PASSWORD=yes -d mysql:5.7 ``` -------------------------------- ### Run Tinode with RethinkDB Backend Source: https://github.com/tinode/chat/blob/master/docker/README.md Starts the Tinode server container, mapping port 6060 and connecting to the 'tinode-net' network. This command is for the RethinkDB backend. ```bash $ docker run -p 6060:6060 -d --name tinode-srv --network tinode-net tinode/tinode-rethinkdb:latest ``` -------------------------------- ### Run RethinkDB Docker Container Source: https://github.com/tinode/chat/blob/master/docker/README.md Starts a RethinkDB 2.3 Docker container on the 'tinode-net' network. Ensure the container name is 'rethinkdb' for Tinode to connect. ```bash $ docker run --name rethinkdb --network tinode-net --restart always -d rethinkdb:2.3 ``` -------------------------------- ### Credentials Table Schema Sample Source: https://github.com/tinode/chat/blob/master/server/db/rethinkdb/schema.md Example structure of a user credential record in the 'credentials' table. Includes validation method, status, and user association. ```js { "Id": "tel:+17025550001", "CreatedAt": Sun Jun 10 2018 16:37:27 GMT+00:00 , "UpdatedAt": Sun Jun 10 2018 16:37:28 GMT+00:00 , "Method": "tel" , "Done": true , "Resp": "123456" , "Retries": 0 , "User": "k3srBRk9RYw" , "Value": "+17025550001" } ``` -------------------------------- ### Initialize Tinode Database with Sample Data Source: https://github.com/tinode/chat/blob/master/INSTALL.md Run the DB initializer for Tinode and load sample data by adding the '-data' flag. ```bash $GOPATH/bin/tinode-db -config=./tinode-db/tinode.conf -data=./tinode-db/data.json ``` -------------------------------- ### Upgrade Database in MongoDB Cluster Source: https://github.com/tinode/chat/blob/master/docker/docker-compose/README.md Starts Tinode in a MongoDB cluster setup with the database upgrade flag enabled. This command is used for database version upgrades. ```bash UPGRADE_DB=true docker-compose -f cluster.yml -f cluster.mongodb.yml up -d tinode-0 ``` -------------------------------- ### Run Basic Login Source: https://github.com/tinode/chat/blob/master/tn-cli/README.md Launches the Tinode command line client with basic username and password authentication. ```bash python tn-cli.py --login-basic=alice:alice123 ``` -------------------------------- ### Reset Database in RethinkDB Single-Instance Source: https://github.com/tinode/chat/blob/master/docker/docker-compose/README.md Starts Tinode in a RethinkDB single-instance setup with the database reset flag enabled. This command is used to reset the database to its initial state. ```bash RESET_DB=true docker-compose -f single-instance.yml -f single-instance.rethinkdb.yml up -d tinode-0 ``` -------------------------------- ### Run Tinode with All DB Adapters and MySQL Source: https://github.com/tinode/chat/blob/master/docker/README.md Starts the Tinode server container using the 'tinode/tinode' image, which includes all database adapters. The specific adapter (e.g., 'mysql') is specified via the STORE_USE_ADAPTER environment variable. ```bash $ docker run -p 6060:6060 -d -e STORE_USE_ADAPTER mysql --name tinode-srv --network tinode-net tinode/tinode:latest ``` -------------------------------- ### Install Tinode GRPC with Ignore Installed Source: https://github.com/tinode/chat/blob/master/chatbot/python/README.md Installs the tinode_grpc package while ignoring any already installed versions. This can resolve permission errors on El Capitan OSX. ```bash $ python -m pip install tinode_grpc --ignore-installed ``` -------------------------------- ### Initialize Tinode Database Source: https://github.com/tinode/chat/blob/master/INSTALL.md Run the database initializer with the path to the data configuration file. ```bash ./init-db -data=data.json ``` -------------------------------- ### Upgrade pip Source: https://github.com/tinode/chat/blob/master/chatbot/python/README.md Ensures you have the latest version of pip installed. This is a prerequisite for installing other dependencies. ```bash $ python -m pip install --upgrade pip ``` -------------------------------- ### Run MongoDB Docker Container and Initialize Replica Set Source: https://github.com/tinode/chat/blob/master/docker/README.md Starts a MongoDB Docker container on the 'tinode-net' network and initializes it as a single-node replica set. The container name must be 'mongodb'. ```bash $ docker run --name mongodb --network tinode-net --restart always -d mongo:latest --replSet "rs0" ``` ```bash $ docker exec -it mongodb mongosh ``` ```javascript > rs.initiate( {"_id": "rs0", "members": [ {"_id": 0, "host": "mongodb:27017"} ]} ) > quit() ``` -------------------------------- ### Create New User Source: https://github.com/tinode/chat/blob/master/tn-cli/sample-script.txt Creates a new user with specified authentication schemes, credentials, and metadata. Use this to provision new accounts. ```bash .must $user acc --scheme=basic --secret=test:test123 \ --fn='Test User' --photo=./test-128.jpg --tags=test,test-user --do-login \ --auth=JRWPA --anon=JW \ --cred=email:test@example.com ``` -------------------------------- ### Run Sample Script with tn-cli.py Source: https://github.com/tinode/chat/blob/master/tn-cli/README.md Execute a sample script using the tn-cli.py Python script. This is useful for testing or demonstrating command sequences. ```bash python tn-cli.py < sample-script.txt ``` -------------------------------- ### Run Tinode Server Source: https://github.com/tinode/chat/blob/master/INSTALL.md Execute the Tinode server binary with configuration and static data paths. ```bash $GOPATH/bin/server -config=./server/tinode.conf -static_data=$HOME/tinode/webapp/ ``` -------------------------------- ### Drafty Form Response Example Source: https://github.com/tinode/chat/blob/master/docs/drafty.md This example shows the content expected in a message response after a 'Yes' button is pressed in a Drafty form. It includes a 'text/x-drafty-fr' mime type and the response data. ```javascript { "txt": "Yes", "fmt": [{ "at":-1 }], "ent": [{ "tp": "EX", "data": { "mime": "text/x-drafty-fr", // drafty form-response. "val": { "seq": 15, // seq id of the message containing the form. "resp": {"yes": "oh yes!"} } } }] } ``` -------------------------------- ### Drafty Object Example Source: https://github.com/tinode/chat/blob/master/docs/drafty.md This example demonstrates the structure of a Drafty object with plain text, inline formatting, and entities. Missing 'at' defaults to 0, and missing 'key' defaults to 0. 'at' and 'len' are measured in Unicode code points. ```javascript { "txt": "Do you agree? Yes No", "fmt": [ {"len": 20, "tp": "FM"}, // missing 'at' is zero: "at": 0 {"len": 13, "tp": "ST"} {"at": 13, "len": 1, "tp": "BR"}, {"at": 14, "len": 3}, // missing 'key' is zero: "key": 0 {"at": 17, "len": 1, "tp": "BR"}, {"at": 18, "len": 2, "key": 1}, ], "ent": [ {"tp": "BN", "data": {"name": "yes", "act": "pub", "val": "oh yes!"}}, {"tp": "BN", "data": {"name": "no", "act": "pub"}} ] } ``` -------------------------------- ### GET Operation Overview Source: https://github.com/tinode/chat/blob/master/docs/API.md The GET operation is used to query metadata and message history for a topic. The requester must be subscribed and attached to the topic for a full response. Different parameters can be specified within the `what` field to retrieve specific types of data. ```APIDOC ## GET Operation Query topic for metadata, such as description or a list of subscribers, or query message history. The requester must be [subscribed and attached](#sub) to the topic to receive the full response. Some limited `desc` and `sub` information is available without being attached. ### Parameters - **id** (string, optional): Client-provided message id. - **topic** (string, required): Name of the topic to request data from. - **what** (string, required): Space-separated list of parameters to query. Unknown values are ignored. ### Supported `what` values and their parameters: #### `desc` Query topic description. Server responds with a `{meta}` message containing requested data. See `{meta}` for details. If `ims` is specified and data has not been updated, the message will skip `trusted`, `public`, and `private` fields. Limited information is available without [attaching](#sub) to topic first. See [Trusted, Public, and Private Fields](#trusted-public-and-private-fields) for `trusted`, `private`, and `public` format considerations. - **desc.ims** (timestamp, optional): If modified since - return public and private values only if at least one of them has been updated after the stated timestamp. #### `sub` Get a list of subscribers. Server responds with a `{meta}` message containing a list of subscribers. See `{meta}` for details. For `me` topic the request returns a list of user's subscriptions. If `ims` is specified and data has not been updated, responds with a `{ctrl}` "not modified" message. Only user's own subscription is returned without [attaching](#sub) to topic first. - **sub.ims** (timestamp, optional): If modified since - return public and private values only if at least one of them has been updated after the stated timestamp. - **sub.user** (string, optional): Return results for a single user, any topic other than 'me'. - **sub.topic** (string, optional): Return results for a single topic, 'me' topic only. - **sub.limit** (integer, optional): Limit the number of returned objects. #### `tags` Query indexed tags. Server responds with a `{meta}` message containing an array of string tags. See `{meta}` and `fnd` topic for details. Supported only for `me` and group topics. #### `data` Query message history. Server sends `{data}` messages matching parameters provided in the `data` field of the query. The `id` field of the data messages is not provided as it's common for data messages. When all `{data}` messages are transmitted, a `{ctrl}` message is sent. - **data.since** (integer, optional): Load messages with server-issued IDs greater or equal to this (inclusive/closed). - **data.before** (integer, optional): Load messages with server-issued sequential IDs less than this (exclusive/open). - **data.limit** (integer, optional): Limit the number of returned objects, default: 32. #### `del` Query message deletion history. Server responds with a `{meta}` message containing a list of deleted message ranges. - **del.since** (integer, optional): Load deleted ranges with the delete transaction IDs greater or equal to this (inclusive/closed). - **del.before** (integer, optional): Load deleted ranges with the delete transaction IDs less than this (exclusive/open). - **del.limit** (integer, optional): Limit the number of returned objects, default: 32. #### `cred` Query [credentials](#credentail-validation). Server responds with a `{meta}` message containing an array of credentials. Supported for `me` topic only. #### `aux` Query auxiliary topic data. Server responds with a `{meta}` message containing an object with auxiliary key-value pairs. ``` -------------------------------- ### SIP Account Setup Source: https://github.com/tinode/chat/blob/master/chatbot/python/quotes.txt A description of setting up a SIP (Session Initiation Protocol) account, explaining that it enables calls to both other SIP users and PSTN (Public Switched Telephone Network) phones. This is relevant for VoIP and telecommunication configurations. ```text Setting up your SIP account will allow you to call both other SIP users as well as pstn phones. - Wim Sweldens ``` -------------------------------- ### Tinode GET Method Parameters Source: https://github.com/tinode/chat/blob/master/docs/API.md This snippet details the structure and available parameters for the GET method in the Tinode API. It covers querying topic descriptions, subscriber lists, message history, deleted message ranges, credentials, and auxiliary data. Specific sub-objects like 'desc', 'sub', 'data', and 'del' allow for fine-grained control over the query. ```javascript get: { id: "1a2b3", // string, client-provided message id, optional topic: "grp1XUtEhjv6HND", // string, name of topic to request data from what: "sub desc data del cred", // string, space-separated list of parameters to query; // unknown values are ignored; required // Optional parameters for {get what="desc"} desc: { ims: "2015-10-06T18:07:30.038Z" // timestamp, "if modified since" - return // public and private values only if at least one of them has been // updated after the stated timestamp, optional }, // Optional parameters for {get what="sub"} sub: { ims: "2015-10-06T18:07:30.038Z", // timestamp, "if modified since" - return // public and private values only if at least one of them has been // updated after the stated timestamp, optional user: "usr2il9suCbuko", // string, return results for a single user, // any topic other than 'me', optional topic: "usr2il9suCbuko", // string, return results for a single topic, // 'me' topic only, optional limit: 20 // integer, limit the number of returned objects }, // Optional parameters for {get what="data"} data: { since: 123, // integer, load messages with server-issued IDs greater or equal // to this (inclusive/closed), optional before: 321, // integer, load messages with server-issed sequential IDs less // than this (exclusive/open), optional limit: 20, // integer, limit the number of returned objects, default: 32, // optional }, // Optional parameters for {get what="del"} del: { since: 5, // integer, load deleted ranges with the delete transaction IDs greater // or equal to this (inclusive/closed), optional before: 12, // integer, load deleted ranges with the delete transaction IDs less // than this (exclusive/open), optional limit: 25, // integer, limit the number of returned objects, default: 32, // optional } } ``` -------------------------------- ### Run tinode-db with parameters Source: https://github.com/tinode/chat/blob/master/tinode-db/README.md Execute the tinode-db utility from the command line with various parameters to manage the database. ```bash tinode-db [parameters] ``` -------------------------------- ### Login with Token Source: https://github.com/tinode/chat/blob/master/tn-cli/sample-script.txt Logs in a user using a previously obtained authentication token. Confirms credentials with a dummy response. ```bash .must login --scheme=token --secret=$user.params[token] --cred=email::123456 ``` -------------------------------- ### Build for PostgreSQL Source: https://github.com/tinode/chat/blob/master/tinode-db/README.md Build the tinode-db package with PostgreSQL support. Use the -i flag to automatically install missing dependencies. ```bash go build -tags postgres go build -i -tags postgres ``` -------------------------------- ### Build for MongoDB Source: https://github.com/tinode/chat/blob/master/tinode-db/README.md Build the tinode-db package with MongoDB support. Use the -i flag to automatically install missing dependencies. ```bash go build -tags mongodb go build -i -tags mongodb ``` -------------------------------- ### Build for RethinkDB Source: https://github.com/tinode/chat/blob/master/tinode-db/README.md Build the tinode-db package with RethinkDB support. Use the -i flag to automatically install missing dependencies. ```bash go build -tags rethinkdb go build -i -tags rethinkdb ``` -------------------------------- ### Create Symlink for Templates Source: https://github.com/tinode/chat/blob/master/INSTALL.md Create a symbolic link from the server's template directory to the bin directory. ```bash ln -s ./server/templ $GOPATH/bin ``` -------------------------------- ### Generate gRPC Files Source: https://github.com/tinode/chat/blob/master/chatbot/python/README.md Use this command to generate Python gRPC files from the model.proto definition. Ensure grpcio-tools is installed. ```bash python -m pip install grpcio-tools python -m grpc_tools.protoc -../../pbx --python_out=. --grpc_python_out=. ../../pbx/model.proto ```