mirror of
https://github.com/ChuckNorrison/LightningTipBot.git
synced 2026-08-19 13:18:12 +02:00
userpage log (#339)
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
This commit is contained in:
parent
c00196e9d6
commit
158990f46d
1 changed files with 3 additions and 2 deletions
|
|
@ -67,14 +67,15 @@ func (s Service) UserPageHandler(w http.ResponseWriter, r *http.Request) {
|
|||
// https://ln.tips/.well-known/lnurlp/<username>
|
||||
username := mux.Vars(r)["username"]
|
||||
callback := fmt.Sprintf("%s/.well-known/lnurlp/%s", internal.Configuration.Bot.LNURLHostName, username)
|
||||
log.Infof("[UserPage] rendering page of %s", username)
|
||||
lnurlEncode, err := lnurl.LNURLEncode(callback)
|
||||
if err != nil {
|
||||
log.Errorln("[UserPageHandler]", err)
|
||||
log.Errorln("[UserPage]", err)
|
||||
return
|
||||
}
|
||||
image, err := s.getTelegramUserPictureURL(username)
|
||||
if err != nil {
|
||||
log.Errorln("[UserPageHandler]", err)
|
||||
log.Errorln("[UserPage]", err)
|
||||
image = "https://telegram.org/img/t_logo.png"
|
||||
}
|
||||
if err := tmpl.ExecuteTemplate(w, "userpage", struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue