Commits

Kelly Washington committed 354eaf5

MAINT-889 Viewer Group Invitation picker needs to limit to 100 residents
Requests to invite more than 100 agents at a time are blocked.
reviewed with Simon.

  • Participants
  • Parent commits 4d6b06d

Comments (0)

Files changed (2)

indra/newview/llpanelgroupinvite.cpp

 	LLTextBox		*mGroupName;
 	std::string		mOwnerWarning;
 	std::string		mAlreadyInGroup;
+	std::string		mTooManySelected;
 	bool		mConfirmedOwnerInvite;
 
 	void (*mCloseCallback)(void* data);
 		role_member_pairs[item->getUUID()] = role_id;
 	}
 	
+	const S32 MAX_GROUP_INVITES = 100; // Max invites per request. 100 to match server cap.
+	if (role_member_pairs.size() > MAX_GROUP_INVITES)
+	{
+		// Fail!
+		LLSD msg;
+		msg["MESSAGE"] = mTooManySelected;
+		LLNotificationsUtil::add("GenericAlert", msg);
+		(*mCloseCallback)(mCloseCallbackUserData);
+		return;
+	}
+
 	LLGroupMgr::getInstance()->sendGroupMemberInvites(mGroupID, role_member_pairs);
 	
 	if(already_in_group)
 
 	mImplementation->mOwnerWarning = getString("confirm_invite_owner_str");
 	mImplementation->mAlreadyInGroup = getString("already_in_group");
+	mImplementation->mTooManySelected = getString("invite_selection_too_large");
 
 	update();
 	

indra/newview/skins/default/xui/en/panel_group_invite.xml

      name="already_in_group">
         Some Residents you chose are already in the group, and so were not sent an invitation.
     </panel.string>
+	<panel.string
+     name="invite_selection_too_large">
+		Group Invitations not sent: too many Residents selected. Group Invitations are limited to 100 per request.
+	</panel.string>
     <text
      type="string"
      length="1"