Fixed issue #2873 - Tweet which is containing * will not send out, Twitter::Error::Unauthorized: Could not authenticate you.
This commit is contained in:
parent
8696c62de8
commit
34704cd2ba
1 changed files with 7 additions and 1 deletions
|
@ -458,7 +458,7 @@ class TwitterSync
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
create a tweet ot direct message from an article
|
create a tweet or direct message from an article
|
||||||
|
|
||||||
=end
|
=end
|
||||||
|
|
||||||
|
@ -498,6 +498,12 @@ create a tweet ot direct message from an article
|
||||||
|
|
||||||
Rails.logger.debug { 'Create tweet from 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(
|
tweet = @client.update(
|
||||||
article[:body],
|
article[:body],
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue