{"_id":"@coralproject/coral-plugin-trust","_rev":"15-bc335a1177d6731e83cab845507700ca","name":"@coralproject/coral-plugin-trust","description":"Trust enables moderators to act on the actions and beheviours of their users.","dist-tags":{"latest":"1.0.1"},"versions":{"0.0.0":{"name":"@coralproject/coral-plugin-trust","version":"0.0.0","main":"index.js","author":{"name":"Wyatt Johnson","email":"wyattjoh@gmail.com"},"license":"Apache-2.0","devDependencies":{"eslint":"^3.19.0"},"gitHead":"aaad194d304b1a81730c021ab66dfa2847b9fc20","description":"Trust enables moderators to act on the actions and beheviours of their users.","_id":"@coralproject/coral-plugin-trust@0.0.0","scripts":{},"_shasum":"a4dbb35613aa539ab5edb3cc2e98251e539c0a17","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.9.0","_npmUser":{"name":"wyattjoh","email":"wyattjoh@gmail.com"},"dist":{"shasum":"a4dbb35613aa539ab5edb3cc2e98251e539c0a17","tarball":"https://registry.npmjs.org/@coralproject/coral-plugin-trust/-/coral-plugin-trust-0.0.0.tgz","integrity":"sha512-ZqqIPZ6Z3DU3J0btbaVDGa38XOvue719dqH3vKMvfZkIxlRaGg6X8tKFxQDRi9v0yngG12bYGmdFuDaETiEIEg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAoxjnW+Btxk23QBnEX2t9tn+nvBqtT0IG4xx1vlm0lAAiAlcKnvAVVsv4qTs8ANGHM9hElMOq7i0I0s55La1XU1DQ=="}]},"maintainers":[{"name":"wyattjoh","email":"wyattjoh@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/coral-plugin-trust-0.0.0.tgz_1493841062091_0.3776336482260376"},"deprecated":"this package has been deprecated","directories":{}},"1.0.1":{"name":"@coralproject/coral-plugin-trust","version":"1.0.1","main":"index.js","author":{"name":"Wyatt Johnson","email":"wyattjoh@gmail.com"},"license":"Apache-2.0","devDependencies":{"eslint":"^3.19.0"},"gitHead":"aaad194d304b1a81730c021ab66dfa2847b9fc20","description":"Trust enables moderators to act on the actions and beheviours of their users.","_id":"@coralproject/coral-plugin-trust@1.0.1","scripts":{},"_shasum":"c6f398c277119a775a8c680e2a37af9e3c0c72a9","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.9.0","_npmUser":{"name":"wyattjoh","email":"wyattjoh@gmail.com"},"dist":{"shasum":"c6f398c277119a775a8c680e2a37af9e3c0c72a9","tarball":"https://registry.npmjs.org/@coralproject/coral-plugin-trust/-/coral-plugin-trust-1.0.1.tgz","integrity":"sha512-JOtvjUC1GNpVmhnaFWJxlFPkce54oJQS0K4BNsUpzVuK4ayn3rEfxo5EFWhhmGkCbLZBoP6aJ8KFMiMK+8Rwlw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDRfr4QZSWq7zAb+1cu+ZpDiQWMh+Me1DGfeWCTuIoZCAiAOmNNvRnLhDA67xBv8LI1FDHf/3TagSaPa7qg0+51U0Q=="}]},"maintainers":[{"name":"wyattjoh","email":"wyattjoh@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/coral-plugin-trust-1.0.1.tgz_1493841224617_0.744571473216638"},"deprecated":"this package has been deprecated","directories":{}}},"readme":"# Trust Plugin for Talk\n\nTrust enables moderators to act on the actions and\nbeheviours of their users.\n\nIt currently provides the following features:\n\n- Tracks user karma for how their flagged comments are handled.\n- Tracks flagging user karma if the moderators agree/disagree with the flagging\n  action.\n- Marks unreliable commenters comments with a `PREMOD` status which will prevent\n  them from loading in the stream until a moderator can approve them.\n\n## Configuration\n\nThe Trust Plugin requries that the configuration variable `TRUST_THRESHOLDS`.\nThe form of the environment variable is:\n\n```\n<name>:<RELIABLE>,<UNRELIABLE>;<name>:<RELIABLE>,<UNRELIABLE>;...\n```\n\nThe default for this variable is `comment:1,1;flag:-1,-1`. This will create an\nobject with the property name of the action type as the key and an object as\nit's value. This will contain a RELIABLE, and UNRELIABLE property with the\nnumber of karma points associated with their particular state.\n\nIf only the RELIABLE variable is provided, then it will also be used as the\nUNRELIABLE variable.\n\n## Database\n\nWe keep track of user actions by adding a new field to users metadata called\n`trust`. We store the following shape there:\n\n```json\n{\n  \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n  \"description\": \"Trust Metadata Object\",\n  \"type\": \"object\",\n  \"properties\": {\n    \"flag\": {\n      \"description\": \"Flag action data\",\n      \"type\": \"object\",\n      \"properties\": {\n        \"karma\": {\n          \"description\": \"Counts positive and negative actions related to flags made by the user\",\n          \"type\": \"number\"\n        }\n      },\n      \"required\": [\n        \"karma\"\n      ]\n    },\n    \"comment\": {\n      \"description\": \"Comment action data\",\n      \"type\": \"object\",\n      \"properties\": {\n        \"karma\": {\n          \"description\": \"Counts positive and negative actions related to comments made by the user\",\n          \"type\": \"number\"\n        }\n      },\n      \"required\": [\n        \"karma\"\n      ]\n    }\n  },\n  \"required\": [\n    \"flag\",\n    \"comment\"\n  ]\n}\n```\n\n## License\n\n    Copyright 2016 Mozilla Foundation\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\n    See the License for the specific language governing permissions and limitations under the License.","maintainers":[{"email":"kabeaty@gmail.com","name":"kabeaty"},{"email":"me@wyattjoh.ca","name":"wyattjoh"},{"email":"vinh@vinh.tech","name":"wikiwi"},{"email":"jessiekrushing@gmail.com","name":"immber"},{"email":"tessathornton@gmail.com","name":"tessat"},{"email":"nick.funk@outlook.com","name":"nick.funk"}],"time":{"modified":"2022-06-12T16:41:53.478Z","created":"2017-05-01T19:01:01.716Z","1.0.0":"2017-05-01T19:01:01.716Z","0.0.0":"2017-05-03T19:51:04.007Z","1.0.1":"2017-05-03T19:53:45.780Z"},"author":{"name":"Wyatt Johnson","email":"wyattjoh@gmail.com"},"license":"Apache-2.0","readmeFilename":"README.md"}