Apply new ESLint rules to legacy code
This commit is contained in:
parent
91cf075697
commit
8a2c17f65f
70 changed files with 376 additions and 516 deletions
|
@ -111,20 +111,22 @@ const createRandomMessage = async ({ conversationId } = {}) => {
|
|||
const _createMessage = ({ commonProperties, conversationId, type } = {}) => {
|
||||
switch (type) {
|
||||
case 'incoming':
|
||||
return Object.assign({}, commonProperties, {
|
||||
return {
|
||||
...commonProperties,
|
||||
flags: 0,
|
||||
source: conversationId,
|
||||
sourceDevice: 1,
|
||||
});
|
||||
};
|
||||
case 'outgoing':
|
||||
return Object.assign({}, commonProperties, {
|
||||
return {
|
||||
...commonProperties,
|
||||
delivered: 1,
|
||||
delivered_to: [conversationId],
|
||||
expireTimer: 0,
|
||||
recipients: [conversationId],
|
||||
sent_to: [conversationId],
|
||||
synced: true,
|
||||
});
|
||||
};
|
||||
default:
|
||||
throw new TypeError(`Unknown message type: '${type}'`);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue