Let X - discrete time stochastic process
A discrete-time martingale: is $E[|X_{n}|] < \infty$ $$ E[X_{n+1}|X_{1}, X_{2}, ..., X_{n}] = X_{n}. $$
The definition of martingale for filtration:
$$ E[X_{n}|F_{m}] = X_{m}, $$ here ${F_{m}}$ is a filtration and the process is adapted.
The question is: how can we get the first definition from the second one?
Let the filtration be $\mathcal{F}_n=\sigma(X_1,\dots,X_n)$, i.e., the smallest sigma field such that each of $X_1,\dots, X_n$ are measurable with respect to it. Conditioning on $X_1,\dots,X_n$ is equivalent to conditioning on $\mathcal{F}_n$, so according to the second definition we have $E[X_{n+1}|X_1,\dots,X_n]=E[X_{n+1}|\mathcal{F}_n]=X_n$.
Note in your definition of martingale for a filtration you should have $m \leq n$. If $m>n$, then $X_n \in \mathcal{F}_m$, so $E[X_n |\mathcal{F}_m]=X_n$.