30 Commits

Author SHA1 Message Date
Robin Ward
8c166e1b06 Revert "Add username and fullname for formatting (#65)"
This reverts commit 7f5ef4f8f5bceae8c1f780dfd3c18be88eee99b4.
2021-03-16 10:27:14 -04:00
Gökhan Gurbetoğlu
7f5ef4f8f5
Add username and fullname for formatting (#65)
Added username and fullname to make them usable in the custom formatting for the posts.
2021-03-15 11:19:05 -04:00
David Taylor
1dc753771b
FIX: Update telegram webhook correctly and remove old code (#46)
The `site_setting_changed` event passes the setting name as a symbol, not a string. This commit also removes the backwards-compatible `site_setting_saved` event, which was deprecated in 2.3.0.
2020-11-02 16:58:29 +00:00
jjaffeux
d5808f4e9a FIX: these are not spe and dont have response.parsed_body 2020-09-25 21:08:28 +02:00
jjaffeux
d483f4ae5a DEV: s/JSON.parse(response.body)/response.parsed_body 2020-09-25 20:47:30 +02:00
Michael K Johnson
da9106127a
FEATURE: Enable optional support for threading slack posts (#38)
When creating a new Discourse post from slack with the `post` feature, record the
slack `ts` thread ID for the resulting topic post using an HTML comment to pass
the `ts` through.

When notifying slack of new Discourse posts, record the slack `ts` thread ID in
the post's topic if it has not yet been recorded. (Normally, this will be done
for the topic post, except where notifications are being posted for old topics
before this feature was created.)

Add a new rule filter `thread` which posts threaded responses to slack if there
is a `ts` recorded for the post topic.

Modify the `trigger_notifications` interface to enable other integrations to
implement similar functionality.

Present the `thread` rule in the help text and admin UI only for the slack
providers.

https://meta.discourse.org/t/optionally-threading-posts-to-parent-topic-in-slack-integration/150759
2020-06-15 16:45:25 +01:00
Saj Goonatilleke
05d4338a12 FIX: telegram: Not all channel posts contain text (#34)
The `text` field is marked optional, and is not guaranteed to exist:

https://core.telegram.org/bots/api#message

We should silently ignore these actions (while responding with a
positive acknowledgement) instead of throwing a `NoMethodError`.
2019-11-20 11:45:34 +01:00
Penar Musaraj
6fcf381751 Rubocop redundant return fix 2019-11-14 15:03:49 -05:00
Leon Xu
0b85c2a0e5 FIX: undefined local variable or method `site_setting_saved' (#30) 2019-08-02 10:05:33 +01:00
Guo Xiang Tan
cef085d0b6 Fix the build. 2019-06-06 10:26:24 +08:00
Guo Xiang Tan
3eb8e97f37 DEV: Remove deprecation warning. 2019-06-06 09:51:40 +08:00
Guo Xiang Tan
ac288b9300 Add frozen string literal comment to files. 2019-05-13 10:37:49 +08:00
Vinoth Kannan
8168c717a8 Return help text if message text is unavailable 2017-12-06 13:07:45 +05:30
Guo Xiang Tan
f836047f90 REFACTOR: Clean up code in plugin. 2017-10-03 17:42:07 +08:00
Guo Xiang Tan
16c5607fa4 Use before_action instead of before_filter for Rails 5.1 compatibility. 2017-09-04 10:44:32 +08:00
David Taylor
4f9ad4efef Correct rubocop offenses 2017-08-01 20:53:39 +01:00
David Taylor
ce8acc9c26 Disallow duplicate channels - providers can define which fields should be ‘unique’ 2017-07-28 15:47:46 +01:00
David Taylor
a5d62bd44d Fix telegram error translation keys 2017-07-28 13:25:31 +01:00
David Taylor
0d9b251030 Allow telegram to send notifications to ‘broadcast channels’ 2017-07-21 19:12:31 +01:00
David Taylor
701e246ad2 Support slash commands in telegram group chats 2017-07-21 17:55:33 +01:00
David Taylor
9d91081f0c Fix the post URL for telegram messages 2017-07-20 12:27:34 +01:00
David Taylor
970c38c7fe Add telegram specs 2017-07-19 21:26:16 +01:00
David Taylor
236251ed11 Remove unnecessary log 2017-07-19 17:34:41 +01:00
David Taylor
509e7bc997 Add telegram slash commands 2017-07-19 17:28:36 +01:00
David Taylor
2e94f23fbe Add Telegram provider.
Does not yet support slash commands, and is without tests.
2017-07-19 16:28:02 +01:00
David Taylor
1ef9073027 Make CHANNEL_PARAMETERS a list 2017-07-17 17:53:32 +01:00
David Taylor
4b25dcec8f Allow providers to define a data schema for their channel parameters 2017-07-13 20:50:45 +01:00
David Taylor
2f6d6f0d54 Automatically mount provider’s engines at /chat-integration/{provider_name}
Provider controllers are automatically disabled when the provider is disabled (works the same way as plugin controllers)
2017-07-05 15:03:02 +01:00
David Taylor
1c416d5a81 Allow providers to be disabled, and tidy up translations 2017-07-03 15:53:26 +01:00
David Taylor
4ad9ad6a7a Move lib files inside a discourse_chat directory, and make the notifications run on a delay after post creation 2017-06-30 11:10:11 +01:00