Acts 15:1-21 described the Council at Jerusalem, the apostles and elders met to hearing a controversial question that raised by the converted Pharisees. Paul and Barnabas plead on behalf of the gentiles against it.
5 Then some of the believers who belonged to the party of the Pharisees stood up and said, “The Gentiles must be circumcised and required to keep the law of Moses.”
Let me requote the speech of James by NIV
16 “‘After this I will return and rebuild David’s fallen tent.
Its ruins I will rebuild, and I will restore it,
17 that the rest of mankind may seek the Lord, even all the Gentiles who bear my name, says the Lord, who does these things’—
18 things known from long ago. (Acts 15:16-18 NIV)
It is clearly the topic was around the gentiles, who were not supposed to worship the Lord in the Holy Temple.
James' speech requoted the prophesy of Amos (Amos 9:11-12), that obviously he edited some words to fit its application to the current matter. The obvious edit was Amos 9:12
12 so that they may possess the remnant of Edom
and all the nations that bear my name,”
declares the Lord, who will do these things.
Amos prophesy was clearly referred to the return of the exiles, and James quoted it referred to a double prophesy of the salvation of the gentiles. By then, the church replaced the Holy Temple as the heart of worship.
'David's fallen tent' is likely referred to the priesthood worship, enforced by the laws, was fallen. 'A shoot will come up from the stump of Jesse (David's father); from his roots a Branch will bear fruit.' (Isaiah 11:1 NIV). On its ruin, the Lord will raise Jesus who is the son of David to lead the Church, restoring a new way of worship for the rest of mankind, and all the Gentiles who seek the Lord will join the Jews to become one.