|
@@ -12,6 +12,7 @@ import ( |
|
|
"gim/pkg/pb" |
|
|
"gim/pkg/pb" |
|
|
"gim/pkg/rpc" |
|
|
"gim/pkg/rpc" |
|
|
"gim/pkg/util" |
|
|
"gim/pkg/util" |
|
|
|
|
|
"strings" |
|
|
"time" |
|
|
"time" |
|
|
|
|
|
|
|
|
"go.uber.org/zap" |
|
|
"go.uber.org/zap" |
|
@@ -374,6 +375,17 @@ func (g *Group) GetMembers(ctx context.Context) ([]*pb.GroupMember, error) { |
|
|
member.AvatarUrl = user.AvatarUrl |
|
|
member.AvatarUrl = user.AvatarUrl |
|
|
member.UserExtra = user.Extra |
|
|
member.UserExtra = user.Extra |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//TODO::返回缩略图 |
|
|
|
|
|
// 检查URL中是否已存在'?' |
|
|
|
|
|
if strings.Contains(member.AvatarUrl, "?") { |
|
|
|
|
|
// 如果存在'?',则分割URL和查询参数,并替换查询参数 |
|
|
|
|
|
parts := strings.Split(member.AvatarUrl, "?") |
|
|
|
|
|
member.AvatarUrl = parts[0] + "?imageView2/1/w/200/h/200" |
|
|
|
|
|
} else { |
|
|
|
|
|
// 如果不存在'?',则直接添加新的查询参数 |
|
|
|
|
|
member.AvatarUrl += "?imageView2/1/w/200/h/200" |
|
|
|
|
|
} |
|
|
infos[i] = &member |
|
|
infos[i] = &member |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|