diff --git a/server/tinode.conf b/server/tinode.conf index 494596b11..2a3ca9df7 100644 --- a/server/tinode.conf +++ b/server/tinode.conf @@ -136,12 +136,13 @@ "serial_num": 1, // Secret key (HMAC salt) for signing the tokens. Generate your own then keep it secret. - // 32 random bytes base64 encioded. + // Any 32 random bytes base64 encoded. // // === IMPORTANT === // // CHANGE IT IN PRODUCTION!!! Otherwise anyone will be able to log in - // to your server without the password. + // to your server without the password. It's just random bytes, use any suitable + // means to get it. "key": "wfaY2RgF2S1OQI/ZlK+LSrp1KB2jwAdGAIHQ7JZn+Kc=" } }, @@ -282,15 +283,15 @@ // Then insert the file contents here. Yes, this is convoluted, but that's Google's fault. "credentials": { "type": "service_account", - "project_id": "your-project-id", - "private_key_id": "some-random-looking-hex-number", - "private_key": "-----BEGIN PRIVATE KEY----- base64-encoded bits of your private key \n-----END PRIVATE KEY-----\n", - "client_email": "firebase-adminsdk-abc123@your-project-id.iam.gserviceaccount.com", - "client_id": "1234567890123456789", - "auth_uri": "https://accounts.google.com/o/oauth2/auth", - "token_uri": "https://oauth2.googleapis.com/token", - "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", - "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-abc123%40your-project-id.iam.gserviceaccount.com" + "project_id": "your-project-id", + "private_key_id": "some-random-looking-hex-number", + "private_key": "-----BEGIN PRIVATE KEY----- base64-encoded bits of your private key \n-----END PRIVATE KEY-----\n", + "client_email": "firebase-adminsdk-abc123@your-project-id.iam.gserviceaccount.com", + "client_id": "1234567890123456789", + "auth_uri": "https://accounts.google.com/o/oauth2/auth", + "token_uri": "https://oauth2.googleapis.com/token", + "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", + "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-abc123%40your-project-id.iam.gserviceaccount.com" }, // An alternative way to provide Firebase service account credentials. diff --git a/server/topic.go b/server/topic.go index ef8a4ac07..64204b523 100644 --- a/server/topic.go +++ b/server/topic.go @@ -861,6 +861,12 @@ func (t *Topic) subCommonReply(h *Hub, sreg *sessionJoin) error { if sreg.created && sreg.pkt.topic != toriginal { params["tmpname"] = sreg.pkt.topic } + + if len(params) == 0 { + // Don't send empty params '{}' + params = nil + } + sreg.sess.queueOut(NoErrParams(sreg.pkt.id, toriginal, now, params)) return nil