Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable logging of certain rooms, such as direct messages #7553

Closed
JohnBFrm opened this issue Jul 24, 2017 · 7 comments
Closed

Disable logging of certain rooms, such as direct messages #7553

JohnBFrm opened this issue Jul 24, 2017 · 7 comments
Labels
Feature: Request Requested Feature

Comments

@JohnBFrm
Copy link

Description:

Currently all messages from all rooms are being logged to the database (MongoDB). We'd like to disable the logging of direct messages, so they are kept completely private.

Server Setup Information:

  • Version of Rocket.Chat Server: 0.57.1
  • Operating System: Ubuntu 16.04
  • Deployment Method(snap/docker/tar/etc): snap
  • Number of Running Instances: 1

Expected behavior:

Direct messages are not to show up in the logs, or in the database

Actual behavior:

Messages are logged and show up in the database

@MartinSchoeler MartinSchoeler added the Feature: Request Requested Feature label Jul 24, 2017
@MartinSchoeler
Copy link
Contributor

Maybe you are looking for something like Off The Record Messaging

@JohnBFrm
Copy link
Author

Hi Martin,

We've checked OTR, but it sadly doesn't fit the full criteria. We would love to be able to disable direct message logging entirely, so none of them end up in the database/saved.

@WebSavvyDude
Copy link

This would also help to reduce unnecessary load on the server. This is a good suggestion and something we are looking for as well and if we had it as optional, that would be even better. We would like to see them completely deleted upon users closing their browser window and not stored anywhere.

@marco-aa
Copy link

@JohnBFrm i think it a usefull feature, too
at the moment i use a work around inspired by #795 by the way the want a similar feature

use yourMongDB-parties-or-rocketchat
db.rocketchat_message.createIndex( { "ts": 1 }, { expireAfterSeconds: 65 } )

mabye you have to change ts:1 to ts:XXX - and i have disabled fileupload and users can only edit / delete messages for 60 seconds this should prevent side effects. If you login later the messages are deleted by the expireAfterSeconds inside the mongoDB

@WebSavvyDude
Copy link

@marco-aa

Hi thanks for pointing to that link.

Do you have any idea of this error? If i use another value such as "ts":100 it works, but not sure what this all means. What does the "ts" represent? Can this "script" be deleted?

rs0:PRIMARY> db.rocketchat_message.createIndex( { "ts": 1 }, { expireAfterSeconds: 3600 } )

{
	"ok" : 0,
	"errmsg" : "Index with name: ts_1 already exists with different options",
	"code" : 85
}

@marco-aa
Copy link

marco-aa commented Jul 31, 2017

Dear @WebSavvyGuy i'm new to mongodb - what i read was that you define a index in this way.
The index { "ts": 1 } was created befor.e. I guess at creation time of the collection or via a migration. If you use { "ts": 100 } you create a new index. The expire defines the time how long mongo will hold the entry in the collection for rocket_message.
It's a like in memcache the database engine will remove the data by it self.
As long as no migration/software update will use the same index key-name you define it will work i guess.
db.rocketchat_messages.getIndexes() will show you the created indexes with its key-names and values

update
this is more clear than my words ;)
https://docs.mongodb.com/manual/tutorial/expire-data/

@marceloschmidt
Copy link
Member

We've implemented the auto-prune feature, which may solve this problem for you. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Request Requested Feature
Projects
None yet
Development

No branches or pull requests

5 participants