Closed wolfsilver closed 2 months ago
Add ACCESS_TOKEN to .env.example and read it in NewService function.
config.go
AccessToken
Config
ACCESS_TOKEN
getConfigFromEnv
memogram.go
NewService
:
userId
access_token
userAccessTokenCache
.env.example
userId:access_token
For more details, open the Copilot Workspace session.
Fixes https://github.com/usememos/telegram-integration/issues/25
It's better to use a simple text file to store this data. Implemented with https://github.com/usememos/telegram-integration/commit/5d7dc80cbc4e5076de789a0556e84f29150b4c00
Add ACCESS_TOKEN to .env.example and read it in NewService function.
config.go
AccessToken
field toConfig
struct.ACCESS_TOKEN
from the environment ingetConfigFromEnv
function.memogram.go
ACCESS_TOKEN
from the configuration inNewService
function.ACCESS_TOKEN
is not blank, split it with:
, getuserId
andaccess_token
, and store them inuserAccessTokenCache
..env.example
ACCESS_TOKEN
variable in the formatuserId:access_token
.For more details, open the Copilot Workspace session.
Fixes https://github.com/usememos/telegram-integration/issues/25