Commit Graph

17 Commits

Author SHA1 Message Date
mix5003
0e41263f9c fix: Ensure messages go to correct conversation when receive multi user in 1 LINE webhook (#12322)
# Pull Request Template

## Description
Ensure messages go to correct conversation when receive multi user in 1
LINE webhook.
base on
[document](https://developers.line.biz/en/reference/messaging-api/#webhook-event-objects:~:text=There%20is%20not%20necessarily%20one%20user%20per%20webhook).
it said
```
There is not necessarily one user per webhook. 
A message event from person A and a follow event from person B may be in the same webhook.
```

this PR has 1 break changes.
In old version. when receive
[follow](https://developers.line.biz/en/reference/messaging-api/#follow-event)
event, it will create conversation with no messages.
After this PR. when receive follow event, it will not create
conversation, contact and messages

## Type of change

Please delete options that are not relevant.

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing
functionality not to work as expected)
- [ ] This change requires a documentation update

## How Has This Been Tested?
add test case.
and follow event test by delete conversation, and block and unblock line
account

## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [ ] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules

---------

Co-authored-by: mix5003 <mix5003@debian.debian>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-22 17:05:25 +05:30
mix5003
b5deecc9f9 feat: Accept file attachment in line channel (#12321)
# Pull Request Template

## Description
This pull request allow LINE to receive files. 

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality not to work as expected)
- [ ] This change requires a documentation update

## How Has This Been Tested?
add testcase. and test manually by myself.
in case you want to test in android, use native share method to share
files to LINE.
you can share more file types to LINE (native line share only send
image,video and audio).


## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [ ] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules

---------

Co-authored-by: mix5003 <mix5003@debian.debian>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2025-09-22 15:06:28 +05:30
mix5003
19d8f6bac5 fix: input_select styles in Line channel (#11805) 2025-07-02 12:33:29 +05:30
Muhsin Keloth
f627dbe42d feat: hide CSAT survey URLs from agents in dashboard (#11622) 2025-06-11 23:39:47 +05:30
mix5003
cf1d0de294 feat: Add message support for input_select type in LINE (#11628)
# Pull Request Template

## Description

Added input_select message type support for LINE

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality not to work as expected)
- [ ] This change requires a documentation update

## How Has This Been Tested?

add testcase. and test manually by myself


## Checklist:

- [X] My code follows the style guidelines of this project
- [X] I have performed a self-review of my code
- [ ] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2025-06-10 15:10:51 +05:30
Sojan Jose
970e76ace8 feat: API Endpoints to update message status (#11387)
- Added an api endpoint for update message status ( available only for
api inboxes )
- Moved message status management to a service. 
- Handles case where read status arrive before delivered 

fixes: #10314 , #9962
2025-04-29 15:33:11 -07:00
caspar
8773929c0e fix: Fix line sticker URL to prevent certain images from failing to d… (#10416)
This commit fixes the issue with Line stickers URLs to prevent certain
images from failing to display. The problem was due to the use of
incorrect URLs. The original URLs pointed to the `iphone` variant, which
failed to load properly in some cases. The fix updates the URLs to use
the `android` variant, ensuring all images are displayed correctly.

### Example:  
- Original (failing URL):  

`https://stickershop.line-scdn.net/stickershop/v1/sticker/17/iphone/sticker.png`
- Fixed (working URL):  

`https://stickershop.line-scdn.net/stickershop/v1/sticker/17/android/sticker.png`


## How Has This Been Tested?

1. Verified the updated URLs by loading multiple Line sticker images to
ensure they display correctly.
2. Tested in both local and production-like environments to confirm the
fix resolves the issue.
3. Reviewed logs to ensure no additional errors are generated related to
Line sticker URLs.
2024-11-15 17:27:58 +04:00
Sojan Jose
6d053e5816 chore: Move line attachment creation to a single db commit (#10194)
Similar to the work we did with the legacy code of other channels like Twilio, we need to move the message creation and attachment creation to be under a single db commit for the line channel. Otherwise, the emitted webhook events for message creation will miss the attachment payload.


Ref: https://github.com/orgs/chatwoot/discussions/7546#discussioncomment-10814495
Ref: https://github.com/chatwoot/chatwoot/pull/10167
2024-10-03 22:13:41 -07:00
Muhsin Keloth
ef50edb9e2 feat: Standardise the external channel user id and user name (#8802)
* feat: Standardize the external channel id and user name

* chore: add specs

* chore: add name space `social`
2024-01-29 16:57:10 +05:30
Muhsin Keloth
db9a32a4c0 feat: Add sticker support in Line channel (#8488) 2023-12-10 20:45:44 -08:00
Muhsin Keloth
fdc1123b18 feat: Add support for attachments(image and video) in LINE channel (#8425) 2023-12-01 07:23:35 +05:30
Muhsin Keloth
11b27f9805 feat: Handle Line send message/attachments errors (#8200) 2023-10-31 07:42:30 +05:30
Sojan Jose
e310230f62 chore: Refactor Contact Inbox Builders (#5617)
- Remove duplicate code and move everything to builders
- fixes: #4680
2022-10-13 15:12:04 -07:00
Jordan Brough
59b31615ed chore: Use "create!" and "save!" bang methods when not checking the result (#5358)
* Use "create!" when not checking for errors on the result
* Use "save!" when not checking the result
2022-09-13 17:40:06 +05:30
Murtaza Bagwala
3d3f0ff6ee feat: Ability to receive attachments from LINE messenger (#3094)
Add support to add videos, audio, and images from line to chatwoot.

Fixes #3039
2021-10-11 19:06:41 +05:30
Sojan Jose
2396b59f11 chore: API fixes (#3014)
- Minor API fixes
- Configuration screen for LINE inbox
2021-09-14 22:44:53 +05:30
Sojan Jose
0a38632f14 feat: Line Channel (#2904)
- Ability to configure line bots as a channel in chatwoot
- Receive a message sent to the line bot in chatwoot
- Ability to reply to line users from chatwoot

fixes: #2738
2021-09-11 01:31:17 +05:30