mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
fix(phone/messages): change how we get source | remove useEffect for parts
This commit is contained in:
1 parent
be479d75cc
commit
15d7d3dcea
2 files changed
+5
-6
No files matched your search
@@ -402,6 +402,7 @@ onNet(events.MESSAGES_FETCH_MESSAGE_GROUPS, async () => {
|
||||
onNet(
|
||||
events.MESSAGES_CREATE_MESSAGE_GROUP,
|
||||
async (phoneNumbers: string[], label: string = null) => {
|
||||
const pSource = (global as any).source;
|
||||
try {
|
||||
const _identifier = await useIdentifier();
|
||||
const result = await createMessageGroupsFromPhoneNumbers(
|
||||
@@ -413,18 +414,18 @@ onNet(
|
||||
if (result.error) {
|
||||
emitNet(
|
||||
events.MESSAGES_CREATE_MESSAGE_GROUP_FAILED,
|
||||
getSource(),
|
||||
pSource,
|
||||
result
|
||||
);
|
||||
} else {
|
||||
emitNet(
|
||||
events.MESSAGES_CREATE_MESSAGE_GROUP_SUCCESS,
|
||||
getSource(),
|
||||
pSource,
|
||||
result
|
||||
);
|
||||
}
|
||||
} catch (e) {
|
||||
emitNet(events.MESSAGES_CREATE_MESSAGE_GROUP_FAILED, getSource());
|
||||
emitNet(events.MESSAGES_CREATE_MESSAGE_GROUP_FAILED, pSource);
|
||||
messageLogger.error(`Failed to create message group, ${e.message}`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user