Re: [mattermost/mattermost-server] Team/Channel members bulk save/update/delete (#14053)

From: notifications@github.com
Domain: IP info github.com
MX-server: IP info out-22.smtp.github.com
Size: 2119 Bytes
Create: 2020-03-26
Update: 2020-03-26
Score: 0
Safe: Yes

Outbound domains: github.com |

@jespino commented on this pull request.


In store/localcachelayer/channel_layer.go:

> +
+func (s LocalCacheChannelStore) SaveMultipleMembers(members []*model.ChannelMember) ([]*model.ChannelMember, *model.AppError) {
+	members, err := s.ChannelStore.SaveMultipleMembers(members)
+	if err != nil {
+		return members, err
+	}
+	for _, member := range members {
+		s.InvalidateMemberCount(member.ChannelId)
+	}
+	return members, nil
+}
+
+func (s LocalCacheChannelStore) UpdateMember(member *model.ChannelMember) (*model.ChannelMember, *model.AppError) {
+	member, err := s.ChannelStore.UpdateMember(member)
+	if err != nil {
+		return member, err

actually not, and if the err != nil member is going to be nil so I think is more explicit to put a nil there.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Want to protect your real email from messages like this? Use TempM email and be more secure on the internet.