Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
hfpp2012
/
vbot
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit bf97a983
authored
Mar 16, 2017
by
HanSon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
member改回旧形式
1 parent
a7d85f3a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
28 deletions
src/Collections/ContactFactory.php
src/Collections/Member.php
src/Collections/ContactFactory.php
View file @
bf97a98
...
@@ -110,11 +110,9 @@ class ContactFactory
...
@@ -110,11 +110,9 @@ class ContactFactory
$groupAccount
[
'MemberList'
]
=
$group
[
'MemberList'
];
$groupAccount
[
'MemberList'
]
=
$group
[
'MemberList'
];
$groupAccount
[
'ChatRoomId'
]
=
$group
[
'EncryChatRoomId'
];
$groupAccount
[
'ChatRoomId'
]
=
$group
[
'EncryChatRoomId'
];
group
()
->
put
(
$group
[
'UserName'
],
$groupAccount
);
group
()
->
put
(
$group
[
'UserName'
],
$groupAccount
);
$members
=
[];
foreach
(
$group
[
'MemberList'
]
as
$member
)
{
foreach
(
$group
[
'MemberList'
]
as
$member
)
{
$members
[
$member
[
'UserName'
]]
=
$member
;
member
()
->
put
(
$member
[
'UserName'
],
$member
)
;
}
}
member
()
->
put
(
$group
[
'UserName'
],
$members
);
}
}
}
}
...
...
src/Collections/Member.php
View file @
bf97a98
...
@@ -33,29 +33,4 @@ class Member extends Collection
...
@@ -33,29 +33,4 @@ class Member extends Collection
return
static
::
$instance
;
return
static
::
$instance
;
}
}
/**
* 根据昵称获取群成员
*
* @param $groupUsername
* @param $memberNickname
* @param bool $blur
* @return array'
*/
public
function
getMembersByNickname
(
$groupUsername
,
$memberNickname
,
$blur
=
false
)
{
$members
=
$this
->
get
(
$groupUsername
);
$result
=
[];
foreach
(
$members
as
$username
=>
$member
)
{
if
(
$blur
&&
str_contains
(
$member
[
'NickName'
],
$memberNickname
))
{
$result
[]
=
$member
;
}
elseif
(
!
$blur
&&
$member
[
'NickName'
]
===
$memberNickname
)
{
$result
[]
=
$member
;
}
}
return
$result
;
}
}
}
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment