Skip to content
Permalink
Browse files

Fixed issue #2873 - Tweet which is containing * will not send out, Tw…

…itter::Error::Unauthorized: Could not authenticate you.
  • Loading branch information
zammad-sync committed Dec 23, 2019
1 parent 8696c62 commit 34704cd2ba0ab7bdb4fade927a078dd813edef7a
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/twitter_sync.rb
@@ -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

@@ -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],
{

0 comments on commit 34704cd

Please sign in to comment.
You can’t perform that action at this time.