mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
refactor(resources/messages): refactor messages
This commit is contained in:
1 parent
ed05ebd6a8
commit
8efcf2e5b5
6 files changed
+633
-565
No files matched your search
@@ -23,6 +23,38 @@ export interface MessageGroup {
|
||||
participants: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Used for the raw npwd_messages_groups row responses
|
||||
*/
|
||||
export interface UnformattedMessageGroup {
|
||||
group_id: string;
|
||||
user_identifier: string;
|
||||
participant_identifier: string;
|
||||
phone_number: string;
|
||||
label?: string;
|
||||
avatar?: string;
|
||||
display?: string;
|
||||
updatedAt: string;
|
||||
unreadCount: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to help consolidate raw npwd_messages_groups rows into
|
||||
* a mapping of a single message group
|
||||
*/
|
||||
export interface MessageGroupMapping {
|
||||
[groupId: string]: {
|
||||
user_identifier: string;
|
||||
// Participant displays
|
||||
participants: string[];
|
||||
phoneNumbers: string[];
|
||||
label?: string;
|
||||
avatar?: string;
|
||||
updatedAt: string;
|
||||
unreadCount: number;
|
||||
};
|
||||
}
|
||||
|
||||
export interface CreateMessageGroupResult {
|
||||
error?: boolean;
|
||||
phoneNumber?: string;
|
||||
|
||||
Reference in new issue
Block a user