@webitel/ui-chats 26.8.4 → 26.8.6
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.
- package/package.json +1 -1
- package/src/v2/scripts/__tests__/getMessageStatus.spec.ts +90 -0
- package/src/v2/scripts/getMessageStatus.ts +2 -1
- package/src/v2/scripts/isSelfMessage.ts +29 -0
- package/src/v2/ui/chat-composer/chat-composer.vue +2 -0
- package/src/v2/ui/chat-history/__tests__/chat-history.spec.ts +99 -0
- package/src/v2/ui/chat-history/chat-history.vue +5 -4
- package/src/v2/ui/chat-history/components/chat-date-divider.vue +6 -0
- package/src/v2/ui/chat-history/components/chat-message.vue +45 -11
- package/src/v2/ui/chat-history/components/chat-system-notice.vue +18 -7
- package/src/v2/ui/chat-history/components/scroll-to-bottom-btn.vue +2 -1
- package/types/.tsbuildinfo +1 -1
- package/types/v2/scripts/isSelfMessage.d.ts +10 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MessageModel, ThreadModel } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Whether the operator using the UI sent this message.
|
|
4
|
+
*
|
|
5
|
+
* Member ids are per membership: an operator who is removed and added again
|
|
6
|
+
* gets a new one, while `thread.members` (and so `selfMemberId`) may still
|
|
7
|
+
* hold the old. So an id match is not enough; the stable identity is the
|
|
8
|
+
* contact — same subject from the same issuer as the operator's own member.
|
|
9
|
+
*/
|
|
10
|
+
export declare const isSelfMessage: (message: MessageModel, thread: ThreadModel, selfMemberId: string) => boolean;
|