Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rescheduled 🗓️
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
c3lingo
rescheduled 🗓️
Commits
4a5103b4
Commit
4a5103b4
authored
11 months ago
by
Teal
Browse files
Options
Downloads
Patches
Plain Diff
use url instead of path for notifications
parent
fe773187
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/subscribers/telegram_bot_subscriber.rb
+4
-4
4 additions, 4 deletions
app/subscribers/telegram_bot_subscriber.rb
with
4 additions
and
4 deletions
app/subscribers/telegram_bot_subscriber.rb
+
4
−
4
View file @
4a5103b4
...
@@ -25,8 +25,8 @@ class TelegramBotSubscriber
...
@@ -25,8 +25,8 @@ class TelegramBotSubscriber
changes
.
delete
(
"stage_id"
)
changes
.
delete
(
"stage_id"
)
end
end
message
=
"<b><a href=
\"
#{
conference_session_
path
(
record
.
conference
,
record
)
}
\"
>Session
#{
record
.
title
}
</a>
#{
action
}
</b>
\n
"
+
message
=
"<b><a href=
\"
#{
conference_session_
url
(
record
.
conference
,
record
)
}
\"
>Session
#{
record
.
title
}
</a>
#{
action
}
</b>
\n
"
+
changes
.
map
{
|
attr
,
(
from
,
to
)
|
"-
#{
attr
}
:
#{
from
}
->
#{
to
}
"
}.
join
(
"
\n
"
)
+
"
\n
#{
conference_session_
path
(
record
.
conference
,
record
)
}
"
changes
.
map
{
|
attr
,
(
from
,
to
)
|
"-
#{
attr
}
:
#{
from
}
->
#{
to
}
"
}.
join
(
"
\n
"
)
+
"
\n
#{
conference_session_
url
(
record
.
conference
,
record
)
}
"
TelegramGroupChatNotificationJob
.
perform_later
(
target:
"-316096320"
,
text:
message
,
parse_mode:
'HTML'
)
TelegramGroupChatNotificationJob
.
perform_later
(
target:
"-316096320"
,
text:
message
,
parse_mode:
'HTML'
)
# TelegramGroupChatNotificationJob.perform_later(target: "2192297", text: message, parse_mode: 'HTML')
# TelegramGroupChatNotificationJob.perform_later(target: "2192297", text: message, parse_mode: 'HTML')
...
@@ -38,8 +38,8 @@ class TelegramBotSubscriber
...
@@ -38,8 +38,8 @@ class TelegramBotSubscriber
record
=
event
.
payload
[
:record
]
record
=
event
.
payload
[
:record
]
session
=
record
.
session
session
=
record
.
session
message
=
"<b><a href=
\"
#{
conference_session_
path
(
session
.
conference
,
session
)
}
\"
>Session
#{
session
.
title
}
</a> Speaker Change</b>
\n
"
+
message
=
"<b><a href=
\"
#{
conference_session_
url
(
session
.
conference
,
session
)
}
\"
>Session
#{
session
.
title
}
</a> Speaker Change</b>
\n
"
+
"
#{
record
.
speaker
.
name
}
#{
action
==
'destroyed'
?
'removed'
:
'added'
}
"
+
"
\n
#{
conference_session_
path
(
session
.
conference
,
session
)
}
"
"
#{
record
.
speaker
.
name
}
#{
action
==
'destroyed'
?
'removed'
:
'added'
}
"
+
"
\n
#{
conference_session_
url
(
session
.
conference
,
session
)
}
"
TelegramGroupChatNotificationJob
.
perform_later
(
target:
"-316096320"
,
text:
message
,
parse_mode:
'HTML'
)
TelegramGroupChatNotificationJob
.
perform_later
(
target:
"-316096320"
,
text:
message
,
parse_mode:
'HTML'
)
end
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment