@wireapp/core 37.1.1 → 37.2.0

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.
@@ -16,10 +16,6 @@ export declare class BroadcastService {
16
16
  * @param onlyDirectConnections=false Will generate a bundle only for directly connected users (users the self user has conversation with). Allows avoiding broadcasting messages to too many people
17
17
  */
18
18
  getPreKeyBundlesFromTeam(teamId: string, skipOwnClients?: boolean, onlyDirectConnections?: boolean): Promise<UserPreKeyBundleMap>;
19
- broadcastGenericMessage(genericMessage: GenericMessage, recipients: UserPreKeyBundleMap | UserClients | QualifiedUserClients, sendAsProtobuf?: boolean, onClientMismatch?: (mismatch: ClientMismatch | MessageSendingStatus) => void | boolean | Promise<boolean>): Promise<(MessageSendingStatus & {
20
- errored?: boolean | undefined;
21
- }) | (ClientMismatch & {
22
- errored?: boolean | undefined;
23
- })>;
19
+ broadcastGenericMessage(genericMessage: GenericMessage, recipients: UserPreKeyBundleMap | UserClients | QualifiedUserClients, sendAsProtobuf?: boolean, onClientMismatch?: (mismatch: ClientMismatch | MessageSendingStatus) => void | boolean | Promise<boolean>): Promise<ClientMismatch | MessageSendingStatus>;
24
20
  }
25
21
  //# sourceMappingURL=BroadcastService.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BroadcastService.d.ts","sourceRoot":"","sources":["../../src/broadcast/BroadcastService.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,WAAW,EACZ,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAC,mBAAmB,EAAC,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAC,cAAc,EAAC,MAAM,6BAA6B,CAAC;AAI3D,OAAO,EAAC,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AAGrD,qBAAa,gBAAgB;IAGf,OAAO,CAAC,QAAQ,CAAC,SAA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AAC,mBAAmB,CAAC;IAyBlB,uBAAuB,CAClC,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,mBAAmB,GAAG,WAAW,GAAG,oBAAoB,EACpE,cAAc,CAAC,EAAE,OAAO,EACxB,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,GAAG,oBAAoB,KAAK,IAAI,GAAG,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;CAkB5G"}
@@ -20,6 +20,7 @@
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
21
  exports.BroadcastService = void 0;
22
22
  const protocol_messaging_1 = require("@wireapp/protocol-messaging");
23
+ const messageSender_1 = require("../conversation/message/messageSender");
23
24
  const MessageService_1 = require("../conversation/message/MessageService");
24
25
  const UserClientsUtil_1 = require("../conversation/message/UserClientsUtil");
25
26
  const util_1 = require("../util");
@@ -58,16 +59,19 @@ class BroadcastService {
58
59
  }
59
60
  async broadcastGenericMessage(genericMessage, recipients, sendAsProtobuf, onClientMismatch) {
60
61
  const plainTextArray = protocol_messaging_1.GenericMessage.encode(genericMessage).finish();
61
- return (0, util_1.isQualifiedUserClients)(recipients)
62
- ? this.messageService.sendFederatedMessage(this.apiClient.validatedClientId, recipients, plainTextArray, {
63
- reportMissing: (0, UserClientsUtil_1.flattenQualifiedUserClients)(recipients).map(({ userId }) => userId),
64
- onClientMismatch,
65
- })
66
- : this.messageService.sendMessage(this.apiClient.validatedClientId, recipients, plainTextArray, {
67
- sendAsProtobuf,
68
- reportMissing: Object.keys(recipients),
69
- onClientMismatch,
70
- });
62
+ const send = () => {
63
+ return (0, util_1.isQualifiedUserClients)(recipients)
64
+ ? this.messageService.sendFederatedMessage(this.apiClient.validatedClientId, recipients, plainTextArray, {
65
+ reportMissing: (0, UserClientsUtil_1.flattenQualifiedUserClients)(recipients).map(({ userId }) => userId),
66
+ onClientMismatch,
67
+ })
68
+ : this.messageService.sendMessage(this.apiClient.validatedClientId, recipients, plainTextArray, {
69
+ sendAsProtobuf,
70
+ reportMissing: Object.keys(recipients),
71
+ onClientMismatch,
72
+ });
73
+ };
74
+ return (0, messageSender_1.sendMessage)(send);
71
75
  }
72
76
  }
73
77
  exports.BroadcastService = BroadcastService;
@@ -61,6 +61,10 @@ export declare class ConversationService {
61
61
  send(params: XOR<SendMlsMessageParams, SendProteusMessageParams>): Promise<SendResult>;
62
62
  sendTypingStart(conversationId: string): Promise<void>;
63
63
  sendTypingStop(conversationId: string): Promise<void>;
64
+ /**
65
+ * returns the number of messages that are in the queue expecting to be sent
66
+ */
67
+ isSendingMessage(): boolean;
64
68
  setConversationMutedStatus(conversationId: string, status: MutedStatus, muteTimestamp: number | Date): Promise<void>;
65
69
  toggleArchiveConversation(conversationId: string, archived: boolean, archiveTimestamp?: number | Date): Promise<void>;
66
70
  setMemberConversationRole(conversationId: string, userId: string, conversationRole: DefaultConversationRoleName | string): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"ConversationService.d.ts","sourceRoot":"","sources":["../../../src/conversation/ConversationService/ConversationService.ts"],"names":[],"mappings":"AAmBA,OAAO,EAEL,YAAY,EACZ,2BAA2B,EAC3B,WAAW,EACX,eAAe,EACf,oBAAoB,EACpB,WAAW,EAGZ,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAC,4BAA4B,EAAC,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAC,GAAG,EAAC,MAAM,oCAAoC,CAAC;AAGvD,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAI9C,OAAO,EAAC,cAAc,EAAE,aAAa,EAAE,oBAAoB,EAAE,UAAU,EAAC,MAAM,6BAA6B,CAAC;AAE5G,OAAO,EAAC,YAAY,EAAsB,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACxF,OAAO,EAAC,mBAAmB,EAAC,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAC,UAAU,EAAuB,MAAM,8BAA8B,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cAAc,EAAE,WAAW;IAI7D;;;;;OAKG;IACU,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAiBvD,4BAA4B,CAAC,OAAO,EAAE,MAAM;IAK5C,mBAAmB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAGrE"}
1
+ {"version":3,"file":"ConversationService.d.ts","sourceRoot":"","sources":["../../../src/conversation/ConversationService/ConversationService.ts"],"names":[],"mappings":"AAmBA,OAAO,EAEL,YAAY,EACZ,2BAA2B,EAC3B,WAAW,EACX,eAAe,EACf,oBAAoB,EACpB,WAAW,EAGZ,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAC,4BAA4B,EAAC,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAC,GAAG,EAAC,MAAM,oCAAoC,CAAC;AAGvD,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAI9C,OAAO,EAAC,cAAc,EAAE,aAAa,EAAE,oBAAoB,EAAE,UAAU,EAAC,MAAM,6BAA6B,CAAC;AAE5G,OAAO,EAAC,YAAY,EAAsB,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACxF,OAAO,EAAC,mBAAmB,EAAC,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAC,UAAU,EAAuB,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAkC,cAAc,EAAC,MAAM,kCAAkC,CAAC;AACjG,OAAO,EACL,mCAAmC,EACnC,wBAAwB,EACzB,MAAM,sEAAsE,CAAC;AAE9E,OAAO,EAAC,UAAU,EAAC,MAAM,YAAY,CAAC;AAItC,qBAAa,mBAAmB;IAK5B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAE1B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,c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AAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAItD,cAAc,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI5D;;OAEG;IACH,gBAAgB,IAAI,OAAO;IAIpB,0BAA0B,CAC/B,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,WAAW,EACnB,aAAa,EAAE,MAAM,GAAG,IAAI,GAC3B,OAAO,CAAC,IAAI,CAAC;IAaT,yBAAyB,CAC9B,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,OAAO,EACjB,gBAAgB,GAAE,MAAM,GAAG,IAAiB,GAC3C,OAAO,CAAC,IAAI,CAAC;IAaT,yBAAyB,CAC9B,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,2BAA2B,GAAG,MAAM,GACrD,OAAO,CAAC,IAAI,CAAC;IAMhB;;;;OAIG;IAEH;;;OAGG;IACU,qBAAqB,CAAC,gBAAgB,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,CAAC;YAmC/E,cAAc;IAqBf,yBAAyB,CAAC,EACrC,gBAAgB,EAChB,OAAO,EACP,cAAc,GACf,EAAE,QAAQ,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC;IAcvC,8BAA8B,CAAC,EAC1C,OAAO,EACP,cAAc,EACd,gBAAgB,GACjB,EAAE,iBAAiB,GAAG,OAAO,CAAC,aAAa,CAAC;IAsBhC,oBAAoB,CAAC,cAAc,EAAE,WAAW;IAI7D;;;;;OAKG;IACU,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAiBvD,4BAA4B,CAAC,OAAO,EAAE,MAAM;IAK5C,mBAAmB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAGrE"}
@@ -141,6 +141,12 @@ class ConversationService {
141
141
  sendTypingStop(conversationId) {
142
142
  return this.apiClient.api.conversation.postTyping(conversationId, { status: data_1.CONVERSATION_TYPING.STOPPED });
143
143
  }
144
+ /**
145
+ * returns the number of messages that are in the queue expecting to be sent
146
+ */
147
+ isSendingMessage() {
148
+ return (0, messageSender_1.isSendingMessage)();
149
+ }
144
150
  setConversationMutedStatus(conversationId, status, muteTimestamp) {
145
151
  if (typeof muteTimestamp === 'number') {
146
152
  muteTimestamp = new Date(muteTimestamp);
@@ -1,6 +1,7 @@
1
1
  import { Task } from '@wireapp/promise-queue';
2
2
  export declare function sendMessage<T>(sendingFunction: Task<T>): Promise<T>;
3
3
  export declare function getQueueLength(): number;
4
+ export declare function isSendingMessage(): boolean;
4
5
  export declare function resumeMessageSending(): void;
5
6
  export declare function pauseMessageSending(): void;
6
7
  //# sourceMappingURL=messageSender.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"messageSender.d.ts","sourceRoot":"","sources":["../../../src/conversation/message/messageSender.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,IAAI,EAAe,MAAM,wBAAwB,CAAC;AAI1D,wBAAgB,WAAW,CAAC,CAAC,EAAE,eAAe,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAEnE;AAED,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AAED,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C"}
1
+ {"version":3,"file":"messageSender.d.ts","sourceRoot":"","sources":["../../../src/conversation/message/messageSender.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,IAAI,EAAe,MAAM,wBAAwB,CAAC;AAI1D,wBAAgB,WAAW,CAAC,CAAC,EAAE,eAAe,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAEnE;AAED,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C;AAED,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AAED,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C"}
@@ -18,7 +18,7 @@
18
18
  *
19
19
  */
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
- exports.pauseMessageSending = exports.resumeMessageSending = exports.getQueueLength = exports.sendMessage = void 0;
21
+ exports.pauseMessageSending = exports.resumeMessageSending = exports.isSendingMessage = exports.getQueueLength = exports.sendMessage = void 0;
22
22
  const promise_queue_1 = require("@wireapp/promise-queue");
23
23
  const sendingQueue = new promise_queue_1.PromiseQueue({ name: 'message-sender', paused: true });
24
24
  function sendMessage(sendingFunction) {
@@ -29,6 +29,10 @@ function getQueueLength() {
29
29
  return sendingQueue.getLength();
30
30
  }
31
31
  exports.getQueueLength = getQueueLength;
32
+ function isSendingMessage() {
33
+ return sendingQueue.hasRunningTasks();
34
+ }
35
+ exports.isSendingMessage = isSendingMessage;
32
36
  function resumeMessageSending() {
33
37
  sendingQueue.pause(false);
34
38
  }
package/package.json CHANGED
@@ -11,11 +11,11 @@
11
11
  "./lib/cryptography/AssetCryptography/crypto.node": "./lib/cryptography/AssetCryptography/crypto.browser.js"
12
12
  },
13
13
  "dependencies": {
14
- "@wireapp/api-client": "^22.6.1",
14
+ "@wireapp/api-client": "^22.7.0",
15
15
  "@wireapp/commons": "^5.0.3",
16
16
  "@wireapp/core-crypto": "0.6.0-pre.4",
17
17
  "@wireapp/cryptobox": "12.8.0",
18
- "@wireapp/promise-queue": "^2.0.3",
18
+ "@wireapp/promise-queue": "^2.1.0",
19
19
  "@wireapp/protocol-messaging": "1.42.0",
20
20
  "@wireapp/store-engine-dexie": "^2.0.3",
21
21
  "axios": "1.1.2",
@@ -58,6 +58,6 @@
58
58
  "test:coverage": "jest --coverage",
59
59
  "watch": "tsc --watch"
60
60
  },
61
- "version": "37.1.1",
62
- "gitHead": "a088b2a1dd03d65078b81b681458bfb9a68d1b35"
61
+ "version": "37.2.0",
62
+ "gitHead": "5d46638e6b045fea0f3afa8fbd57fa133b502901"
63
63
  }