Fixed recipient list (exclude now username) on twitter reply.
This commit is contained in:
parent
082e087797
commit
7cbe4f9da1
1 changed files with 11 additions and 4 deletions
|
@ -218,15 +218,22 @@ class App.TicketZoomArticleActions extends App.Controller
|
||||||
recipientString = ''
|
recipientString = ''
|
||||||
recipientScreenNames = recipients.split(',')
|
recipientScreenNames = recipients.split(',')
|
||||||
for recipientScreenName in recipientScreenNames
|
for recipientScreenName in recipientScreenNames
|
||||||
|
if recipientScreenName
|
||||||
|
recipientScreenName = recipientScreenName.trim().toLowerCase()
|
||||||
|
|
||||||
# exclude already listed screen name
|
# exclude already listed screen name
|
||||||
if !body || !body.match(recipientScreenName)
|
exclude = false
|
||||||
|
if body && body.toLowerCase().match(recipientScreenName)
|
||||||
|
exclude = true
|
||||||
|
|
||||||
# exclude own screen_name
|
# exclude own screen_name
|
||||||
if !body || !body.match(@ticket.preferences.channel_screen_name)
|
if recipientScreenName is "@#{@ticket.preferences.channel_screen_name}".toLowerCase()
|
||||||
|
exclude = true
|
||||||
|
|
||||||
|
if exclude is false
|
||||||
if recipientString isnt ''
|
if recipientString isnt ''
|
||||||
recipientString += ' '
|
recipientString += ' '
|
||||||
recipientString += recipientScreenName.trim()
|
recipientString += recipientScreenName
|
||||||
|
|
||||||
if body
|
if body
|
||||||
articleNew.body = "#{recipientString} #{body} "
|
articleNew.body = "#{recipientString} #{body} "
|
||||||
|
|
Loading…
Reference in a new issue