mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
refactor: use constant state & authInfo on legacy
This commit is contained in:
@@ -13,7 +13,7 @@ const makeGroupsSocket = (config: LegacySocketConfig) => {
|
||||
generateMessageTag,
|
||||
currentEpoch,
|
||||
setQuery,
|
||||
getState
|
||||
state
|
||||
} = sock
|
||||
|
||||
/** Generic function for group queries */
|
||||
@@ -23,7 +23,7 @@ const makeGroupsSocket = (config: LegacySocketConfig) => {
|
||||
{
|
||||
tag: 'group',
|
||||
attrs: {
|
||||
author: getState().legacy?.user?.id,
|
||||
author: state.legacy?.user?.id,
|
||||
id: tag,
|
||||
type: type,
|
||||
jid: jid,
|
||||
@@ -217,7 +217,7 @@ const makeGroupsSocket = (config: LegacySocketConfig) => {
|
||||
subject: result.name,
|
||||
id: jid,
|
||||
creation: undefined,
|
||||
owner: getState().legacy?.user?.id,
|
||||
owner: state.legacy?.user?.id,
|
||||
participants: result.recipients!.map(({ id }) => (
|
||||
{ id: jidNormalizedUser(id), isAdmin: false, isSuperAdmin: false }
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user