Skip to content

Commit

Permalink
fix(webhook): whitespace between spans
Browse files Browse the repository at this point in the history
  • Loading branch information
MrOrz committed Oct 21, 2024
1 parent 0a87da5 commit a1ea0b2
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,13 @@ Do you want someone to fact-check this message?",
Object {
"contents": Array [
Object {
"text": "That it is most likely",
"text": "That it is most likely ",
"type": "span",
},
Object {
"color": "#ffb600",
"decoration": "none",
"text": "a rumor",
"text": "a rumor,",
"type": "span",
"weight": "bold",
},
Expand All @@ -179,13 +179,13 @@ Do you want someone to fact-check this message?",
Object {
"contents": Array [
Object {
"text": "and you are willing to",
"text": "And you are willing to ",
"type": "span",
},
Object {
"color": "#ffb600",
"decoration": "none",
"text": "make this messasge public",
"text": "make this message public",
"type": "span",
"weight": "bold",
},
Expand All @@ -204,7 +204,7 @@ Do you want someone to fact-check this message?",
"contents": Array [
Object {
"color": "#ffb600",
"text": "press “🆕 Report to database” to make this message public on Cofacts website ",
"text": "Press “🆕 Report to database” to make this message public on Cofacts website ",
"type": "span",
"weight": "bold",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -582,13 +582,13 @@ Do you want someone to fact-check this message?",
Object {
"contents": Array [
Object {
"text": "That it is most likely",
"text": "That it is most likely ",
"type": "span",
},
Object {
"color": "#ffb600",
"decoration": "none",
"text": "a rumor",
"text": "a rumor,",
"type": "span",
"weight": "bold",
},
Expand All @@ -614,13 +614,13 @@ Do you want someone to fact-check this message?",
Object {
"contents": Array [
Object {
"text": "and you are willing to",
"text": "And you are willing to ",
"type": "span",
},
Object {
"color": "#ffb600",
"decoration": "none",
"text": "make this messasge public",
"text": "make this message public",
"type": "span",
"weight": "bold",
},
Expand All @@ -639,7 +639,7 @@ Do you want someone to fact-check this message?",
"contents": Array [
Object {
"color": "#ffb600",
"text": "press “🆕 Report to database” to make this message public on Cofacts website ",
"text": "Press “🆕 Report to database” to make this message public on Cofacts website ",
"type": "span",
"weight": "bold",
},
Expand Down
10 changes: 5 additions & 5 deletions src/webhook/handlers/__tests__/askingArticleSource.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,13 @@ it('sends user submission consent if user forwarded the whole message', async ()
Object {
"contents": Array [
Object {
"text": "That it is most likely",
"text": "That it is most likely ",
"type": "span",
},
Object {
"color": "#ffb600",
"decoration": "none",
"text": "a rumor",
"text": "a rumor,",
"type": "span",
"weight": "bold",
},
Expand All @@ -318,13 +318,13 @@ it('sends user submission consent if user forwarded the whole message', async ()
Object {
"contents": Array [
Object {
"text": "and you are willing to",
"text": "And you are willing to ",
"type": "span",
},
Object {
"color": "#ffb600",
"decoration": "none",
"text": "make this messasge public",
"text": "make this message public",
"type": "span",
"weight": "bold",
},
Expand All @@ -343,7 +343,7 @@ it('sends user submission consent if user forwarded the whole message', async ()
"contents": Array [
Object {
"color": "#ffb600",
"text": "press “🆕 Report to database” to make this message public on Cofacts website ",
"text": "Press “🆕 Report to database” to make this message public on Cofacts website ",
"type": "span",
"weight": "bold",
},
Expand Down
12 changes: 6 additions & 6 deletions src/webhook/handlers/askingCooccurrence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const askingCooccurence: ChatbotPostbackHandler = async ({
replies: [
{
type: 'flex',
altText: t`Be the first to report the message`,
altText: t`Be the first to report these messages`,
contents: {
type: 'bubble',
body: {
Expand Down Expand Up @@ -143,11 +143,11 @@ const askingCooccurence: ChatbotPostbackHandler = async ({
contents: [
{
type: 'span',
text: /* t: If you believe ~ a rumor */ t`That they are most likely`,
text: /* t: If you believe ~ a rumor */ t`That they are most likely `,
},
{
type: 'span',
text: /* t: If you believe that it is most likely ~ */ t`rumors`,
text: /* t: If you believe that it is most likely ~ */ t`rumors,`,
decoration: 'none',
color: '#ffb600',
weight: 'bold',
Expand Down Expand Up @@ -175,11 +175,11 @@ const askingCooccurence: ChatbotPostbackHandler = async ({
contents: [
{
type: 'span',
text: /* t: ~ make this messasge public */ t`and you are willing to`,
text: /* t: ~ make this messasge public */ t`And you are willing to `,
},
{
type: 'span',
text: /* t: and you are willing to ~ */ t`make these messasges public`,
text: /* t: and you are willing to ~ */ t`make these messages public`,
decoration: 'none',
color: '#ffb600',
weight: 'bold',
Expand All @@ -195,7 +195,7 @@ const askingCooccurence: ChatbotPostbackHandler = async ({
contents: [
{
type: 'span',
text: t`press${btnText}” to make these messages public on Cofacts website `,
text: t`Press${btnText}” to make these messages public on Cofacts website `,
color: '#ffb600',
weight: 'bold',
},
Expand Down
10 changes: 5 additions & 5 deletions src/webhook/handlers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,11 @@ export function createAskArticleSubmissionConsentReply(
contents: [
{
type: 'span',
text: /* t: If you believe ~ a rumor */ t`That it is most likely`,
text: /* t: If you believe ~ a rumor */ t`That it is most likely `,
},
{
type: 'span',
text: /* t: If you believe that it is most likely ~ */ t`a rumor`,
text: /* t: If you believe that it is most likely ~ */ t`a rumor,`,
decoration: 'none',
color: '#ffb600',
weight: 'bold',
Expand Down Expand Up @@ -225,11 +225,11 @@ export function createAskArticleSubmissionConsentReply(
contents: [
{
type: 'span',
text: /* t: ~ make this messasge public */ t`and you are willing to`,
text: /* t: ~ make this messasge public */ t`And you are willing to `,
},
{
type: 'span',
text: /* t: and you are willing to ~ */ t`make this messasge public`,
text: /* t: and you are willing to ~ */ t`make this message public`,
decoration: 'none',
color: '#ffb600',
weight: 'bold',
Expand All @@ -245,7 +245,7 @@ export function createAskArticleSubmissionConsentReply(
contents: [
{
type: 'span',
text: t`press${btnText}” to make this message public on Cofacts website `,
text: t`Press${btnText}” to make this message public on Cofacts website `,
color: '#ffb600',
weight: 'bold',
},
Expand Down

0 comments on commit a1ea0b2

Please sign in to comment.