Skip to content

Commit

Permalink
Fixed issue #2873 - Tweet which is containing * will not send out, Tw…
Browse files Browse the repository at this point in the history
…itter::Error::Unauthorized: Could not authenticate you.
  • Loading branch information
zammad-sync committed Dec 23, 2019
1 parent 8696c62 commit 34704cd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/twitter_sync.rb
Expand Up @@ -458,7 +458,7 @@ def to_group(tweet, group_id, channel)

=begin
create a tweet ot direct message from an article
create a tweet or direct message from an article
=end

Expand Down Expand Up @@ -498,6 +498,12 @@ def from_article(article)

Rails.logger.debug { 'Create tweet from article...' }

# rubocop:disable Style/AsciiComments
# workaround for https://github.com/sferik/twitter/issues/677
# https://github.com/zammad/zammad/issues/2873 - unable to post
# tweets with * - replace `*` with the wide-asterisk `*`.
# rubocop:enable Style/AsciiComments
article[:body].tr!('*', '*') if article[:body].present?
tweet = @client.update(
article[:body],
{
Expand Down

0 comments on commit 34704cd

Please sign in to comment.