Fourier series with filter function $f_n^g(x)=\int_0^{2\pi}f_n(y)G(x,y)dy$ I have a question about Fourier series and filter functions that is related to the question here 

Consider the Fourier Series Approximation for $x\in [0,2 \pi)$ that
$$f_n(x)=\sum_{|k|\leq n} c_k \phi_k(x)$$ where
  $$\phi_k(x)=\frac{1}{\sqrt{ 2 \pi}}e^{ikx}$$
A filter function is a function $g:\mathbb{R}\rightarrow \mathbb{R}$
  satisfying 
1) g is an even function 
2) $g(0)=1$ 
3) $g(\xi)=0$, $|\xi|\geq 1$.
We also define $$f^g_n(x)=\sum_{|k|\leq n}g(\frac{k}{n})c_k\phi_k(x)$$
I am given the following and asked to find an explicit expression in
  terms of $\phi_k$ and $g$ for a complex valued, bi-variate function
  G(x,y) such that.
$$f_n^g(x)=\int_0^{2\pi}f_n(y)G(x,y)dy$$

I know that if g is identically equal to 1 then the answer is $G(x,y)=\delta(x-y)$ from the link above; however, I have been struggling to find the general solution. 
My Attempt: 
There are two distinct attempts that I made for this problem: 
1) $$\frac1{\sqrt{2\pi}}\sum c_k\int^{2\pi}_0 e^{iky}G(x,y)dy=\frac1{\sqrt{2\pi}}\sum g(k/n) c_k e^{ikx}$$
$$\sum c_k \left(\int^{2\pi}_0 e^{iky}G(x,y)dy-g(k/n)e^{ikx}\right)=0$$
It is natural to assume
$$\int^{2\pi}_0 e^{iky}G(x,y) dy=g(k/n)e^{ikx}\qquad{(1)}$$
So that I get $$G(x,y)=g(k/n)\delta(x-y)$$ but then I feel like I need my answer to be independent of k and n. Also, I did't use the properties of a filter function so I feel this is not correct. 
2) I tried to relate $f_n^g(x)$ to the Fourier coefficents of $G(x,y)'s$ Fourier series in y.
Let,
$G(x,y)=\sum_{|k|\leq n} A_k \phi_k(y)$ where 
$A_k=\langle G(x,y), \phi_k(y)\rangle_{L^2}=\int_0^{2\pi}G(x,y)\bar{\phi(y)}dy$
Then, $$\int_0^{2\pi}f_n(y)G(x,y)dy=\int_0^{2\pi}\sum_{|k|\leq n} c_k \phi_k(y)\sum_{|k|\leq n} A_k \phi_k(y)dy = \sum_{|k|\leq n} g(k/n)c_k \phi_k(y)$$
But then I got stuck on this approach. I was trying to define the $A_k$ so that I knew what $G(x,y)$ would be.
 A: I figured it out... 
Assume we can represent G(x,y) as a Fourier series in y such that $$G(x,y)=\sum_{|k|\leq n}A_k \bar{\phi_k}(y)$$
Then, we want to show $$f_n^g(x)=\int_0^{2\pi} f_n(y)G(x,y)dy$$
$$\Rightarrow f_n^g(x)= \int_0^{2\pi} f_n(y)\sum_{|k|\leq n}A_k \bar{\phi_k}(y)dy$$
$$\Rightarrow f_n^g(x)= \bigg\langle \sum_{|k|\leq n}c_k \phi_k(y), \sum_{|k|\leq n}\bar{A_k} \phi_k(y)\bigg\rangle$$
$$\Rightarrow f_n^g(x)= \sum_{|k|\leq n}c_k A_k \bigg\langle \phi_k(y), \phi_k(y)\bigg\rangle$$
$$\Rightarrow \sum_{|k|\leq n}g\bigg(\frac{k}{n}\bigg)c_k \phi_k(x)= \sum_{|k|\leq n} c_k A_k$$
So, we get that $$
A_k=g\bigg(\frac{k}{n}\bigg)\phi_k(x).$$
So, $$G(x,y)=\sum_{|k|\leq n}g\bigg(\frac{k}{n}\bigg)\phi_k(x)\bar{\phi_k}(y)$$
Now I will prove that this is the correct answer. 
$$\int_0^{2\pi} f_n(y)G(x,y)dy$$
$$\Rightarrow f_n^g(x)= \int_0^{2\pi} f_n(y)\sum_{|k|\leq n}g\bigg(\frac{k}{n}\bigg)\phi_k(x) \bar{\phi_k}(y)dy$$
$$\Rightarrow f_n^g(x)= \int_0^{2\pi} \sum_{|k|\leq n}c_k \phi_k(y)\sum_{|k|\leq n}g\bigg(\frac{k}{n}\bigg)\phi_k(x) \bar{\phi_k}(y)dy$$
$$\Rightarrow f_n^g(x)= \sum_{|k|\leq n} c_k g\bigg(\frac{k}{n}\bigg)\phi_k(x) \int_0^{2\pi}  \phi_k(y) \bar{\phi_k}(y)dy$$
$$\Rightarrow f_n^g(x)= \sum_{|k|\leq n} c_k g\bigg(\frac{k}{n}\bigg)\phi_k(x)$$
