@pney/whatsapp-web 1.34.6 → 1.34.7-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/.env.example +0 -1
  2. package/.gitattributes +4 -0
  3. package/.husky/commit-msg +4 -0
  4. package/.husky/pre-commit +1 -0
  5. package/.lintstagedrc.json +6 -0
  6. package/.prettierignore +8 -0
  7. package/.prettierrc.json +10 -0
  8. package/README.md +83 -80
  9. package/commitlint.config.js +29 -0
  10. package/eslint.config.mjs +67 -0
  11. package/example.js +151 -71
  12. package/index.d.ts +982 -734
  13. package/index.js +4 -4
  14. package/package.json +3 -3
  15. package/shell.js +4 -4
  16. package/src/Client.js +1860 -920
  17. package/src/authStrategies/BaseAuthStrategy.js +4 -2
  18. package/src/authStrategies/LocalAuth.js +25 -12
  19. package/src/authStrategies/NoAuth.js +3 -4
  20. package/src/authStrategies/RemoteAuth.js +92 -43
  21. package/src/factories/ChatFactory.js +1 -1
  22. package/src/factories/ContactFactory.js +2 -2
  23. package/src/structures/Base.js +5 -3
  24. package/src/structures/Broadcast.js +1 -2
  25. package/src/structures/BusinessContact.js +1 -2
  26. package/src/structures/Buttons.js +14 -10
  27. package/src/structures/Call.js +10 -6
  28. package/src/structures/Channel.js +171 -91
  29. package/src/structures/Chat.js +57 -41
  30. package/src/structures/ClientInfo.js +1 -1
  31. package/src/structures/Contact.js +37 -16
  32. package/src/structures/GroupChat.js +425 -228
  33. package/src/structures/GroupNotification.js +21 -12
  34. package/src/structures/Label.js +6 -6
  35. package/src/structures/List.js +22 -14
  36. package/src/structures/Location.js +5 -4
  37. package/src/structures/Message.js +412 -168
  38. package/src/structures/MessageMedia.js +31 -18
  39. package/src/structures/Order.js +4 -4
  40. package/src/structures/Payment.js +6 -3
  41. package/src/structures/Poll.js +2 -2
  42. package/src/structures/PollVote.js +9 -6
  43. package/src/structures/PrivateChat.js +2 -4
  44. package/src/structures/PrivateContact.js +2 -4
  45. package/src/structures/Product.js +1 -1
  46. package/src/structures/ProductMetadata.js +1 -2
  47. package/src/structures/Reaction.js +2 -4
  48. package/src/structures/ScheduledEvent.js +22 -10
  49. package/src/util/Constants.js +8 -6
  50. package/src/util/Injected/AuthStore/AuthStore.js +7 -3
  51. package/src/util/Injected/Utils.js +753 -345
  52. package/src/util/InterfaceController.js +72 -25
  53. package/src/util/Puppeteer.js +1 -1
  54. package/src/util/Util.js +28 -15
  55. package/src/webCache/LocalWebCache.js +7 -5
  56. package/src/webCache/RemoteWebCache.js +10 -4
  57. package/src/webCache/WebCache.js +8 -5
  58. package/src/webCache/WebCacheFactory.js +9 -9
  59. package/CODE_OF_CONDUCT.md +0 -133
@@ -4,7 +4,6 @@
4
4
  * Interface Controller
5
5
  */
6
6
  class InterfaceController {
7
-
8
7
  constructor(props) {
9
8
  this.pupPage = props.pupPage;
10
9
  }
@@ -15,8 +14,12 @@ class InterfaceController {
15
14
  */
16
15
  async openChatWindow(chatId) {
17
16
  return await this.pupPage.evaluate(async (chatId) => {
18
- const chat = await window.WWebJS.getChat(chatId, { getAsModel: false });
19
- return await (window.require('WAWebCmd').Cmd).openChatBottom({'chat':chat});
17
+ const chat = await window.WWebJS.getChat(chatId, {
18
+ getAsModel: false,
19
+ });
20
+ return await window
21
+ .require('WAWebCmd')
22
+ .Cmd.openChatBottom({ chat: chat });
20
23
  }, chatId);
21
24
  }
22
25
 
@@ -25,9 +28,11 @@ class InterfaceController {
25
28
  * @param {string} chatId ID of the chat drawer that will be opened
26
29
  */
27
30
  async openChatDrawer(chatId) {
28
- await this.pupPage.evaluate(async chatId => {
29
- let chat = await window.WWebJS.getChat(chatId, { getAsModel: false });
30
- await (window.require('WAWebCmd').Cmd).openDrawerMid(chat);
31
+ await this.pupPage.evaluate(async (chatId) => {
32
+ let chat = await window.WWebJS.getChat(chatId, {
33
+ getAsModel: false,
34
+ });
35
+ await window.require('WAWebCmd').Cmd.openDrawerMid(chat);
31
36
  }, chatId);
32
37
  }
33
38
 
@@ -36,9 +41,11 @@ class InterfaceController {
36
41
  * @param {string} chatId ID of the chat search that will be opened
37
42
  */
38
43
  async openChatSearch(chatId) {
39
- await this.pupPage.evaluate(async chatId => {
40
- let chat = await window.WWebJS.getChat(chatId, { getAsModel: false });
41
- await (window.require('WAWebCmd').Cmd).chatSearch(chat);
44
+ await this.pupPage.evaluate(async (chatId) => {
45
+ let chat = await window.WWebJS.getChat(chatId, {
46
+ getAsModel: false,
47
+ });
48
+ await window.require('WAWebCmd').Cmd.chatSearch(chat);
42
49
  }, chatId);
43
50
  }
44
51
 
@@ -48,10 +55,24 @@ class InterfaceController {
48
55
  */
49
56
  async openChatWindowAt(msgId) {
50
57
  await this.pupPage.evaluate(async (msgId) => {
51
- const msg = (window.require('WAWebCollections')).Msg.get(msgId) || (await (window.require('WAWebCollections')).Msg.getMessagesById([msgId]))?.messages?.[0];
52
- const chat = (window.require('WAWebCollections')).Chat.get(msg.id.remote) ?? await (window.require('WAWebCollections')).Chat.find(msg.id.remote);
53
- const searchContext = await (window.require('WAWebChatMessageSearch')).getSearchContext(chat, msg.id);
54
- await (window.require('WAWebCmd').Cmd).openChatAt({ chat: chat, msgContext: searchContext });
58
+ const msg =
59
+ window.require('WAWebCollections').Msg.get(msgId) ||
60
+ (
61
+ await window
62
+ .require('WAWebCollections')
63
+ .Msg.getMessagesById([msgId])
64
+ )?.messages?.[0];
65
+ const chat =
66
+ window.require('WAWebCollections').Chat.get(msg.id.remote) ??
67
+ (await window
68
+ .require('WAWebCollections')
69
+ .Chat.find(msg.id.remote));
70
+ const searchContext = await window
71
+ .require('WAWebChatMessageSearch')
72
+ .getSearchContext(chat, msg.id);
73
+ await window
74
+ .require('WAWebCmd')
75
+ .Cmd.openChatAt({ chat: chat, msgContext: searchContext });
55
76
  }, msgId);
56
77
  }
57
78
 
@@ -60,9 +81,15 @@ class InterfaceController {
60
81
  * @param {string} msgId ID of the message drawer that will be opened
61
82
  */
62
83
  async openMessageDrawer(msgId) {
63
- await this.pupPage.evaluate(async msgId => {
64
- const msg = (window.require('WAWebCollections')).Msg.get(msgId) || (await (window.require('WAWebCollections')).Msg.getMessagesById([msgId]))?.messages?.[0];
65
- await (window.require('WAWebCmd').Cmd).msgInfoDrawer(msg);
84
+ await this.pupPage.evaluate(async (msgId) => {
85
+ const msg =
86
+ window.require('WAWebCollections').Msg.get(msgId) ||
87
+ (
88
+ await window
89
+ .require('WAWebCollections')
90
+ .Msg.getMessagesById([msgId])
91
+ )?.messages?.[0];
92
+ await window.require('WAWebCmd').Cmd.msgInfoDrawer(msg);
66
93
  }, msgId);
67
94
  }
68
95
 
@@ -71,7 +98,9 @@ class InterfaceController {
71
98
  */
72
99
  async closeRightDrawer() {
73
100
  await this.pupPage.evaluate(async () => {
74
- await window.require('WAWebDrawerManager').DrawerManager.closeDrawerRight();
101
+ await window
102
+ .require('WAWebDrawerManager')
103
+ .DrawerManager.closeDrawerRight();
75
104
  });
76
105
  }
77
106
 
@@ -80,8 +109,11 @@ class InterfaceController {
80
109
  */
81
110
  async getFeatures() {
82
111
  return await this.pupPage.evaluate(() => {
83
- if(!(window.require('WAWebCollections')).Features) throw new Error('This version of Whatsapp Web does not support features');
84
- return (window.require('WAWebCollections')).Features.F;
112
+ if (!window.require('WAWebCollections').Features)
113
+ throw new Error(
114
+ 'This version of Whatsapp Web does not support features',
115
+ );
116
+ return window.require('WAWebCollections').Features.F;
85
117
  });
86
118
  }
87
119
 
@@ -91,8 +123,13 @@ class InterfaceController {
91
123
  */
92
124
  async checkFeatureStatus(feature) {
93
125
  return await this.pupPage.evaluate((feature) => {
94
- if(!(window.require('WAWebCollections')).Features) throw new Error('This version of Whatsapp Web does not support features');
95
- return (window.require('WAWebCollections')).Features.supportsFeature(feature);
126
+ if (!window.require('WAWebCollections').Features)
127
+ throw new Error(
128
+ 'This version of Whatsapp Web does not support features',
129
+ );
130
+ return window
131
+ .require('WAWebCollections')
132
+ .Features.supportsFeature(feature);
96
133
  }, feature);
97
134
  }
98
135
 
@@ -102,9 +139,14 @@ class InterfaceController {
102
139
  */
103
140
  async enableFeatures(features) {
104
141
  await this.pupPage.evaluate((features) => {
105
- if(!(window.require('WAWebCollections')).Features) throw new Error('This version of Whatsapp Web does not support features');
142
+ if (!window.require('WAWebCollections').Features)
143
+ throw new Error(
144
+ 'This version of Whatsapp Web does not support features',
145
+ );
106
146
  for (const feature in features) {
107
- (window.require('WAWebCollections')).Features.setFeature(features[feature], true);
147
+ window
148
+ .require('WAWebCollections')
149
+ .Features.setFeature(features[feature], true);
108
150
  }
109
151
  }, features);
110
152
  }
@@ -115,9 +157,14 @@ class InterfaceController {
115
157
  */
116
158
  async disableFeatures(features) {
117
159
  await this.pupPage.evaluate((features) => {
118
- if(!(window.require('WAWebCollections')).Features) throw new Error('This version of Whatsapp Web does not support features');
160
+ if (!window.require('WAWebCollections').Features)
161
+ throw new Error(
162
+ 'This version of Whatsapp Web does not support features',
163
+ );
119
164
  for (const feature in features) {
120
- (window.require('WAWebCollections')).Features.setFeature(features[feature], false);
165
+ window
166
+ .require('WAWebCollections')
167
+ .Features.setFeature(features[feature], false);
121
168
  }
122
169
  }, features);
123
170
  }
@@ -20,4 +20,4 @@ async function exposeFunctionIfAbsent(page, name, fn) {
20
20
  await page.exposeFunction(name, fn);
21
21
  }
22
22
 
23
- module.exports = {exposeFunctionIfAbsent};
23
+ module.exports = { exposeFunctionIfAbsent };
package/src/util/Util.js CHANGED
@@ -13,15 +13,20 @@ const has = (o, k) => Object.prototype.hasOwnProperty.call(o, k);
13
13
  */
14
14
  class Util {
15
15
  constructor() {
16
- throw new Error(`The ${this.constructor.name} class may not be instantiated.`);
16
+ throw new Error(
17
+ `The ${this.constructor.name} class may not be instantiated.`,
18
+ );
17
19
  }
18
20
 
19
21
  static generateHash(length) {
20
22
  var result = '';
21
- var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
23
+ var characters =
24
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
22
25
  var charactersLength = characters.length;
23
26
  for (var i = 0; i < length; i++) {
24
- result += characters.charAt(Math.floor(Math.random() * charactersLength));
27
+ result += characters.charAt(
28
+ Math.floor(Math.random() * charactersLength),
29
+ );
25
30
  }
26
31
  return result;
27
32
  }
@@ -49,7 +54,7 @@ class Util {
49
54
  /**
50
55
  * Formats a image to webp
51
56
  * @param {MessageMedia} media
52
- *
57
+ *
53
58
  * @returns {Promise<MessageMedia>} media in webp format
54
59
  */
55
60
  static async formatImageToWebpSticker(media, pupPage) {
@@ -68,7 +73,7 @@ class Util {
68
73
  /**
69
74
  * Formats a video to webp
70
75
  * @param {MessageMedia} media
71
- *
76
+ *
72
77
  * @returns {Promise<MessageMedia>} media in webp format
73
78
  */
74
79
  static async formatVideoToWebpSticker(media) {
@@ -79,13 +84,13 @@ class Util {
79
84
 
80
85
  const tempFile = path.join(
81
86
  tmpdir(),
82
- `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`
87
+ `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`,
83
88
  );
84
89
 
85
90
  const stream = new (require('stream').Readable)();
86
91
  const buffer = Buffer.from(
87
92
  media.data.replace(`data:${media.mimetype};base64,`, ''),
88
- 'base64'
93
+ 'base64',
89
94
  );
90
95
  stream.push(buffer);
91
96
  stream.push(null);
@@ -100,7 +105,7 @@ class Util {
100
105
  'libwebp',
101
106
  '-vf',
102
107
  // eslint-disable-next-line no-useless-escape
103
- 'scale=\'iw*min(300/iw\,300/ih)\':\'ih*min(300/iw\,300/ih)\',format=rgba,pad=300:300:\'(300-iw)/2\':\'(300-ih)/2\':\'#00000000\',setsar=1,fps=10',
108
+ "scale='iw*min(300/iw\,300/ih)':'ih*min(300/iw\,300/ih)',format=rgba,pad=300:300:'(300-iw)/2':'(300-ih)/2':'#00000000',setsar=1,fps=10",
104
109
  '-loop',
105
110
  '0',
106
111
  '-ss',
@@ -132,8 +137,8 @@ class Util {
132
137
  /**
133
138
  * Sticker metadata.
134
139
  * @typedef {Object} StickerMetadata
135
- * @property {string} [name]
136
- * @property {string} [author]
140
+ * @property {string} [name]
141
+ * @property {string} [author]
137
142
  * @property {string[]} [categories]
138
143
  */
139
144
 
@@ -141,7 +146,7 @@ class Util {
141
146
  * Formats a media to webp
142
147
  * @param {MessageMedia} media
143
148
  * @param {StickerMetadata} metadata
144
- *
149
+ *
145
150
  * @returns {Promise<MessageMedia>} media in webp format
146
151
  */
147
152
  static async formatToWebpSticker(media, metadata, pupPage) {
@@ -151,8 +156,7 @@ class Util {
151
156
  webpMedia = await this.formatImageToWebpSticker(media, pupPage);
152
157
  else if (media.mimetype.includes('video'))
153
158
  webpMedia = await this.formatVideoToWebpSticker(media);
154
- else
155
- throw new Error('Invalid media format');
159
+ else throw new Error('Invalid media format');
156
160
 
157
161
  if (metadata.name || metadata.author) {
158
162
  const img = new webp.Image();
@@ -161,8 +165,17 @@ class Util {
161
165
  const packname = metadata.name;
162
166
  const author = metadata.author;
163
167
  const categories = metadata.categories || [''];
164
- const json = { 'sticker-pack-id': stickerPackId, 'sticker-pack-name': packname, 'sticker-pack-publisher': author, 'emojis': categories };
165
- let exifAttr = Buffer.from([0x49, 0x49, 0x2A, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x41, 0x57, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00]);
168
+ const json = {
169
+ 'sticker-pack-id': stickerPackId,
170
+ 'sticker-pack-name': packname,
171
+ 'sticker-pack-publisher': author,
172
+ emojis: categories,
173
+ };
174
+ let exifAttr = Buffer.from([
175
+ 0x49, 0x49, 0x2a, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00,
176
+ 0x41, 0x57, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00,
177
+ 0x00, 0x00,
178
+ ]);
166
179
  let jsonBuffer = Buffer.from(JSON.stringify(json), 'utf8');
167
180
  let exif = Buffer.concat([exifAttr, jsonBuffer]);
168
181
  exif.writeUIntLE(jsonBuffer.length, 14, 4);
@@ -6,7 +6,7 @@ const { WebCache, VersionResolveError } = require('./WebCache');
6
6
  /**
7
7
  * LocalWebCache - Fetches a WhatsApp Web version from a local file store
8
8
  * @param {object} options - options
9
- * @param {string} options.path - Path to the directory where cached versions are saved, default is: "./.wwebjs_cache/"
9
+ * @param {string} options.path - Path to the directory where cached versions are saved, default is: "./.wwebjs_cache/"
10
10
  * @param {boolean} options.strict - If true, will throw an error if the requested version can't be fetched. If false, will resolve to the latest version.
11
11
  */
12
12
  class LocalWebCache extends WebCache {
@@ -19,12 +19,14 @@ class LocalWebCache extends WebCache {
19
19
 
20
20
  async resolve(version) {
21
21
  const filePath = path.join(this.path, `${version}.html`);
22
-
22
+
23
23
  try {
24
24
  return fs.readFileSync(filePath, 'utf-8');
25
- }
26
- catch (err) {
27
- if (this.strict) throw new VersionResolveError(`Couldn't load version ${version} from the cache`);
25
+ } catch (ignoredError) {
26
+ if (this.strict)
27
+ throw new VersionResolveError(
28
+ `Couldn't load version ${version} from the cache`,
29
+ );
28
30
  return null;
29
31
  }
30
32
  }
@@ -11,7 +11,10 @@ class RemoteWebCache extends WebCache {
11
11
  constructor(options = {}) {
12
12
  super();
13
13
 
14
- if (!options.remotePath) throw new Error('webVersionCache.remotePath is required when using the remote cache');
14
+ if (!options.remotePath)
15
+ throw new Error(
16
+ 'webVersionCache.remotePath is required when using the remote cache',
17
+ );
15
18
  this.remotePath = options.remotePath;
16
19
  this.strict = options.strict || false;
17
20
  }
@@ -28,8 +31,11 @@ class RemoteWebCache extends WebCache {
28
31
  console.error(`Error fetching version ${version} from remote`, err);
29
32
  }
30
33
 
31
- if (this.strict) throw new VersionResolveError(`Couldn't load version ${version} from the archive`);
32
- return null;
34
+ if (this.strict)
35
+ throw new VersionResolveError(
36
+ `Couldn't load version ${version} from the archive`,
37
+ );
38
+ return null;
33
39
  }
34
40
 
35
41
  async persist() {
@@ -37,4 +43,4 @@ class RemoteWebCache extends WebCache {
37
43
  }
38
44
  }
39
45
 
40
- module.exports = RemoteWebCache;
46
+ module.exports = RemoteWebCache;
@@ -2,13 +2,16 @@
2
2
  * Default implementation of a web version cache that does nothing.
3
3
  */
4
4
  class WebCache {
5
- async resolve() { return null; }
6
- async persist() { }
5
+ async resolve() {
6
+ return null;
7
+ }
8
+
9
+ async persist() {}
7
10
  }
8
11
 
9
- class VersionResolveError extends Error { }
12
+ class VersionResolveError extends Error {}
10
13
 
11
14
  module.exports = {
12
15
  WebCache,
13
- VersionResolveError
14
- };
16
+ VersionResolveError,
17
+ };
@@ -4,17 +4,17 @@ const { WebCache } = require('./WebCache');
4
4
 
5
5
  const createWebCache = (type, options) => {
6
6
  switch (type) {
7
- case 'remote':
8
- return new RemoteWebCache(options);
9
- case 'local':
10
- return new LocalWebCache(options);
11
- case 'none':
12
- return new WebCache();
13
- default:
14
- throw new Error(`Invalid WebCache type ${type}`);
7
+ case 'remote':
8
+ return new RemoteWebCache(options);
9
+ case 'local':
10
+ return new LocalWebCache(options);
11
+ case 'none':
12
+ return new WebCache();
13
+ default:
14
+ throw new Error(`Invalid WebCache type ${type}`);
15
15
  }
16
16
  };
17
17
 
18
18
  module.exports = {
19
19
  createWebCache,
20
- };
20
+ };
@@ -1,133 +0,0 @@
1
-
2
- # Contributor Covenant Code of Conduct
3
-
4
- ## Our Pledge
5
-
6
- We as members, contributors, and leaders pledge to make participation in our
7
- community a harassment-free experience for everyone, regardless of age, body
8
- size, visible or invisible disability, ethnicity, sex characteristics, gender
9
- identity and expression, level of experience, education, socio-economic status,
10
- nationality, personal appearance, race, religion, or sexual identity
11
- and orientation.
12
-
13
- We pledge to act and interact in ways that contribute to an open, welcoming,
14
- diverse, inclusive, and healthy community.
15
-
16
- ## Our Standards
17
-
18
- Examples of behavior that contributes to a positive environment for our
19
- community include:
20
-
21
- * Demonstrating empathy and kindness toward other people
22
- * Being respectful of differing opinions, viewpoints, and experiences
23
- * Giving and gracefully accepting constructive feedback
24
- * Accepting responsibility and apologizing to those affected by our mistakes,
25
- and learning from the experience
26
- * Focusing on what is best not just for us as individuals, but for the
27
- overall community
28
-
29
- Examples of unacceptable behavior include:
30
-
31
- * The use of sexualized language or imagery, and sexual attention or
32
- advances of any kind
33
- * Trolling, insulting or derogatory comments, and personal or political attacks
34
- * Public or private harassment
35
- * Publishing others' private information, such as a physical or email
36
- address, without their explicit permission
37
- * Other conduct which could reasonably be considered inappropriate in a
38
- professional setting
39
-
40
- ## Enforcement Responsibilities
41
-
42
- Community leaders are responsible for clarifying and enforcing our standards of
43
- acceptable behavior and will take appropriate and fair corrective action in
44
- response to any behavior that they deem inappropriate, threatening, offensive,
45
- or harmful.
46
-
47
- Community leaders have the right and responsibility to remove, edit, or reject
48
- comments, commits, code, wiki edits, issues, and other contributions that are
49
- not aligned to this Code of Conduct, and will communicate reasons for moderation
50
- decisions when appropriate.
51
-
52
- ## Scope
53
-
54
- This Code of Conduct applies within all community spaces, and also applies when
55
- an individual is officially representing the community in public spaces.
56
- Examples of representing our community include using an official e-mail address,
57
- posting via an official social media account, or acting as an appointed
58
- representative at an online or offline event.
59
-
60
- ## Enforcement
61
-
62
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
63
- reported to the community leaders responsible for enforcement at
64
- [pedroslopez@me.com](mailto:pedroslopez@me.com).
65
- All complaints will be reviewed and investigated promptly and fairly.
66
-
67
- All community leaders are obligated to respect the privacy and security of the
68
- reporter of any incident.
69
-
70
- ## Enforcement Guidelines
71
-
72
- Community leaders will follow these Community Impact Guidelines in determining
73
- the consequences for any action they deem in violation of this Code of Conduct:
74
-
75
- ### 1. Correction
76
-
77
- **Community Impact**: Use of inappropriate language or other behavior deemed
78
- unprofessional or unwelcome in the community.
79
-
80
- **Consequence**: A private, written warning from community leaders, providing
81
- clarity around the nature of the violation and an explanation of why the
82
- behavior was inappropriate. A public apology may be requested.
83
-
84
- ### 2. Warning
85
-
86
- **Community Impact**: A violation through a single incident or series
87
- of actions.
88
-
89
- **Consequence**: A warning with consequences for continued behavior. No
90
- interaction with the people involved, including unsolicited interaction with
91
- those enforcing the Code of Conduct, for a specified period of time. This
92
- includes avoiding interactions in community spaces as well as external channels
93
- like social media. Violating these terms may lead to a temporary or
94
- permanent ban.
95
-
96
- ### 3. Temporary Ban
97
-
98
- **Community Impact**: A serious violation of community standards, including
99
- sustained inappropriate behavior.
100
-
101
- **Consequence**: A temporary ban from any sort of interaction or public
102
- communication with the community for a specified period of time. No public or
103
- private interaction with the people involved, including unsolicited interaction
104
- with those enforcing the Code of Conduct, is allowed during this period.
105
- Violating these terms may lead to a permanent ban.
106
-
107
- ### 4. Permanent Ban
108
-
109
- **Community Impact**: Demonstrating a pattern of violation of community
110
- standards, including sustained inappropriate behavior, harassment of an
111
- individual, or aggression toward or disparagement of classes of individuals.
112
-
113
- **Consequence**: A permanent ban from any sort of public interaction within
114
- the community.
115
-
116
- ## Attribution
117
-
118
- This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119
- version 2.0, available at
120
- [https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
121
-
122
- Community Impact Guidelines were inspired by
123
- [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124
-
125
- For answers to common questions about this code of conduct, see the FAQ at
126
- [https://www.contributor-covenant.org/faq][FAQ]. Translations are available
127
- at [https://www.contributor-covenant.org/translations][translations].
128
-
129
- [homepage]: https://www.contributor-covenant.org
130
- [v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
131
- [Mozilla CoC]: https://github.com/mozilla/diversity
132
- [FAQ]: https://www.contributor-covenant.org/faq
133
- [translations]: https://www.contributor-covenant.org/translations