Restaurant servers dodged a bullet this week with a provision tucked into the $1.3 trillion federal spending bill.

Late last year, the Department of Labor proposed a rule that would have authorized restaurants to share tips between servers and cooks. That would allow employers to keep some tip money for themselves, as long as each worker made at least the full federal minimum wage of $7.25 an hour.

Workers' rights groups argued the rule change would lower the pay of those who work at restaurants, hotels and bars. Opponents of the rule held splashy public protests. The Labor Department received more than 218,000 mostly negative comments on the proposal.

It appeared to have worked. The spending bill, which President Donald Trump signed into law on Friday, includes a section that makes it clear that employers may not pocket any portion of tips that diners leave for workers.

"We beat them," said Saru Jayaraman, president of the nonprofit Restaurant Opportunities Center. "I think they realized how outrageous what they were proposing sounded to the public, and basically they backed down."

Representatives for the restaurant industry, however, are also pleased.

Related: How this Supreme Court case could impact workers' rights

The National Restaurant Association said it never asked for employers to be allowed to keep tips in the first place. Angelo Amador, senior VP at the trade group, argued that most employers wouldn't skim tips even if they were allowed to.

"A decision by a restaurant to retain some or all of the customer tips rather than distributing them to the hourly staff would be unpopular with employees and guests alike, and it could severely damage the public's perception of the restaurant," Amador wrote in his comment on the proposed rule.

The left-leaning Economic Policy Institute disagreed, saying that many employers take a portion of tips even in places where it's forbidden, and would do so even more often if it were legal. In a recent report, it estimated that servers would lose some $5.8 billion in tips annually to their employers.

The language in the spending bill also effectively does another big thing: It allows employers to pool tips and distribute them among staff, as long as the employer also pays the full minimum wage. Many owners have long sought to boost the pay of kitchen workers and bussers by forcing servers to share their tips.

"We want to ensure that servers, bussers, dishwashers, cooks, and others who work as a team to provide great customer service in the industry have access to share in tips left by customers, as this legislation clearly allows," said Amador.

That's fine with labor advocates at the National Employment Law Project, who say that pooling tips is a good way to create wage equity, as long workers are paid the full minimum wage and tips aren't shared with managers or any other supervisors. "We enthusiastically support this compromise," said Judy Conti, the group's director of federal affairs.

Related: For gig economy workers in these states, rights are at risk

Going forward, however, there may be less agreement between workers' rights advocates and the National Restaurant Association.

Currently, the federal minimum wage for workers who get tips is $2.13 an hour. Seven states have done away with the two tiers and made the minimum for tipped workers the same as it is for employees who earn regular wages.

Many cities and states have already raised their overall minimum wages, as the federal level has remained unchanged since 2009. The question of eliminating lower tipped minimum wages will be on the ballot this year in Washington, D.C., and Michigan and New York is considering the proposal.

All of these efforts have generally come over the objections of the restaurant industry, which argues that the economy and nature of the jobs have changed.

"The minimum wage, with all due respect, is a 1938 income support system for a workforce that worked in manufacturing and agriculture," said Cicely Simpson, executive vice president for public affairs at the National Restaurant Association, at a panel discussion last month. "In our workforce, we have people who drive an Uber during the day and work in restaurants at night. They have no desire to spend their entire career in an entire industry."

Simpson later softened her stance and said that the National Restaurant Association would like to see policies such as the minimum wage and overtime thresholds be "updated," not trashed entirely.