Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main #70

Open
wants to merge 64 commits into
base: develop
Choose a base branch
from
Open

Main #70

Changes from 7 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
e85f00f
chore: updated flutter sdk and major versions of packages
Nov 25, 2024
b3fe248
chore: updated package implementation calls to satisfy version updates
Nov 25, 2024
63ea8ce
chore: updated example app gradle configs
Nov 26, 2024
9ef3700
chore: update chatwoot message object with attachments
Nov 26, 2024
dd8570d
chore: added csat response and request data classes
Nov 26, 2024
5ca5f74
feat(chatwootclient): send csat response & new message media attachment
Nov 26, 2024
19dfed7
feat(chatwootclient): update chatwoot chat page with attachments and …
Nov 26, 2024
d94dbf2
chore: update dialog with message attachments
Nov 26, 2024
c684be0
chore: remove chatwoot dialog deprecation
Nov 26, 2024
cdf3440
feat: add custom link preview
Nov 26, 2024
be9d9fc
chore: remove preview packages
Nov 26, 2024
3d9127f
chore: added chatwoot chat with attachment example
Nov 26, 2024
5172802
fix: set dialog attachment callbacks
Nov 26, 2024
41af12a
fix: clear text after submit
Nov 26, 2024
3c7617c
fix: update send csat request json
Nov 26, 2024
33c7729
fix: update send csat request json
Nov 27, 2024
75df090
chore: move fetch link preview to link metadata class
Nov 27, 2024
8c82464
feat: added custom video preview with cache capabilties
Nov 27, 2024
3232246
fix: launch url on link preview tap
Nov 27, 2024
5ee6232
fix: fixed messages merger logic
Nov 27, 2024
abba4c3
fix: disable csat form interaction on sent tapped
Nov 27, 2024
1cbc534
fix: show link url on preview fetch error
Nov 28, 2024
3b77152
fix: only download attached document if hasn't already been downloaded
Nov 28, 2024
e989442
tests(chatwoot_client_service_test): update send message service tests
Nov 28, 2024
b224f7f
tests(chatwoot_repository_test): update onConversationResolved callba…
Nov 28, 2024
170c397
tests: added tests for send csat survey
Nov 28, 2024
ea21df3
chore: disabled csat form trigger
Nov 28, 2024
b60f5a9
fix(flutter_analyze): remove unused example method
Nov 28, 2024
e4efc33
fix: add phone number to chatwoot user
Nov 29, 2024
9dfb3fe
fix: update phone number hive field key
Nov 29, 2024
fd5cfef
fix: fixed manual csat update
Nov 29, 2024
b76a707
fix: fixed system messages classified as user message
Nov 29, 2024
3d2de1c
feat: support user hmac hash generation
Nov 29, 2024
5c448d2
fix(interceptor): attach user identifier and hmac hash to requests
Nov 29, 2024
5af540a
fix: added avatar error placeholder and message date
Nov 29, 2024
f53444e
fix: replace boturl with text placeholder
Nov 29, 2024
ec28962
fix: update hive id to prevent conflicts
Nov 29, 2024
b040674
fix(chatwoot_dialog): set user identity validation key
Nov 29, 2024
6e85c71
fix: update chat avatar design
Nov 29, 2024
7706151
chore: track generated files for pubspec git specifications
Nov 29, 2024
7e79ccc
fix: reconnect websocket on error and disconnection
Nov 30, 2024
0456cb8
fix: update test
Nov 30, 2024
e4a6fa4
fix: fallback to url if link preview title is empty
Nov 30, 2024
6d5a200
Merge branch 'fix/add_avatar_placeholders_and_dates' into sdk_dev
Nov 30, 2024
55a3c7a
Merge branch 'fix/add_phone_number_to_chatwoot_user' into sdk_dev
Nov 30, 2024
71c722e
chore: update chatwootuser.g.dart file
Nov 30, 2024
3bcea30
fix: fixed widgets conversation callback
Nov 30, 2024
fdb1c48
Merge branch 'fix/add_avatar_placeholders_and_dates' into sdk_dev
Nov 30, 2024
37aeaee
fix: fixed attach file download logic
Nov 30, 2024
5dfda40
Merge branch 'fix/add_avatar_placeholders_and_dates' into sdk_dev
Nov 30, 2024
db92e38
fix: update null survey feedback
Nov 30, 2024
f4265a4
fix: update null survey feedback
Nov 30, 2024
f6f6919
chore: remove unused configuration
Dec 3, 2024
2a32f14
chore: update example configuration
Dec 3, 2024
e6712a8
chore: update read me documentation
Dec 3, 2024
957d638
chore(readme): replaced table example code with section links
Dec 3, 2024
5ec2138
fix(chatwoot_chat_dialog): remove ununsed imports
Dec 3, 2024
488fb66
chore: merged chore/update_readme_documentation
Dec 3, 2024
847db79
chore: updated package version
Dec 3, 2024
dc37664
Merge branch 'chore/update_readme_documentation' into sdk_dev
Dec 3, 2024
e48112c
update deps
ShahramMebashar Dec 3, 2024
70a7696
update deps
ShahramMebashar Dec 3, 2024
7ab73aa
update deps
ShahramMebashar Dec 3, 2024
f0fd15e
update deps
ShahramMebashar Dec 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
227 changes: 156 additions & 71 deletions README.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions example/lib/main_client.dart
Original file line number Diff line number Diff line change
@@ -46,6 +46,7 @@ class _MyHomePageState extends State<MyHomePage> {
context,
title: "Customer Support",
inboxIdentifier: "your-api-inbox-identifier",
userIdentityValidationKey: "your-hmac-user-validation-key",
baseUrl: "https://app.chatwoot.com",
user: ChatwootUser(
identifier: "test@test.com",
@@ -68,6 +69,7 @@ class _MyHomePageState extends State<MyHomePage> {
),
body: ChatwootChat(
inboxIdentifier: "your-api-inbox-identifier",
userIdentityValidationKey: "your-hmac-user-validation-key",
baseUrl: "https://app.chatwoot.com",
user: ChatwootUser(
identifier: "test@test.com",
112 changes: 0 additions & 112 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
any_link_preview:
dependency: transitive
description:
name: any_link_preview
sha256: "3135873778da5400e784ec4f304229d16f5d748276de2fce88170554907bca46"
url: "https://pub.dev"
source: hosted
version: "3.0.2"
archive:
dependency: transitive
description:
@@ -365,14 +357,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.1.2"
flutter_svg:
dependency: transitive
description:
name: flutter_svg
sha256: "936d9c1c010d3e234d1672574636f3352b4941ca3decaddd3cafaeb9ad49c471"
url: "https://pub.dev"
source: hosted
version: "2.0.15"
flutter_test:
dependency: "direct dev"
description: flutter
@@ -703,14 +687,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.9.0"
path_parsing:
dependency: transitive
description:
name: path_parsing
sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
path_provider:
dependency: "direct main"
description:
@@ -871,62 +847,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.0.1"
shared_preferences:
dependency: transitive
description:
name: shared_preferences
sha256: "95f9997ca1fb9799d494d0cb2a780fd7be075818d59f00c43832ed112b158a82"
url: "https://pub.dev"
source: hosted
version: "2.3.3"
shared_preferences_android:
dependency: transitive
description:
name: shared_preferences_android
sha256: "3b9febd815c9ca29c9e3520d50ec32f49157711e143b7a4ca039eb87e8ade5ab"
url: "https://pub.dev"
source: hosted
version: "2.3.3"
shared_preferences_foundation:
dependency: transitive
description:
name: shared_preferences_foundation
sha256: "07e050c7cd39bad516f8d64c455f04508d09df104be326d8c02551590a0d513d"
url: "https://pub.dev"
source: hosted
version: "2.5.3"
shared_preferences_linux:
dependency: transitive
description:
name: shared_preferences_linux
sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f"
url: "https://pub.dev"
source: hosted
version: "2.4.1"
shared_preferences_platform_interface:
dependency: transitive
description:
name: shared_preferences_platform_interface
sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80"
url: "https://pub.dev"
source: hosted
version: "2.4.1"
shared_preferences_web:
dependency: transitive
description:
name: shared_preferences_web
sha256: d2ca4132d3946fec2184261726b355836a82c33d7d5b67af32692aff18a4684e
url: "https://pub.dev"
source: hosted
version: "2.4.2"
shared_preferences_windows:
dependency: transitive
description:
name: shared_preferences_windows
sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1"
url: "https://pub.dev"
source: hosted
version: "2.4.1"
sky_engine:
dependency: transitive
description: flutter
@@ -1020,14 +940,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.2.0"
string_validator:
dependency: transitive
description:
name: string_validator
sha256: a278d038104aa2df15d0e09c47cb39a49f907260732067d0034dc2f2e4e2ac94
url: "https://pub.dev"
source: hosted
version: "1.1.0"
synchronized:
dependency: transitive
description:
@@ -1148,30 +1060,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.5.1"
vector_graphics:
dependency: transitive
description:
name: vector_graphics
sha256: "27d5fefe86fb9aace4a9f8375b56b3c292b64d8c04510df230f849850d912cb7"
url: "https://pub.dev"
source: hosted
version: "1.1.15"
vector_graphics_codec:
dependency: transitive
description:
name: vector_graphics_codec
sha256: "2430b973a4ca3c4dbc9999b62b8c719a160100dcbae5c819bae0cacce32c9cdb"
url: "https://pub.dev"
source: hosted
version: "1.1.12"
vector_graphics_compiler:
dependency: transitive
description:
name: vector_graphics_compiler
sha256: "1b4b9e706a10294258727674a340ae0d6e64a7231980f9f9a3d12e4b42407aad"
url: "https://pub.dev"
source: hosted
version: "1.1.16"
vector_math:
dependency: transitive
description:
22 changes: 11 additions & 11 deletions lib/data/chatwoot_repository.dart
Original file line number Diff line number Diff line change
@@ -139,17 +139,17 @@ class ChatwootRepositoryImpl extends ChatwootRepository {
CsatSurveyFeedbackResponse feedback = await clientService.sendCsatFeedBack(conversationUuid, request);
if(feedback.csatSurveyResponse == null){
feedback = CsatSurveyFeedbackResponse(
id: feedback.id,
csatSurveyResponse: CsatResponse(
id:feedback.id,
conversationId: feedback.conversationId,
rating: request.rating,
feedbackMessage: request.feedbackMessage
),
inboxAvatarUrl: feedback.inboxAvatarUrl,
inboxName: feedback.inboxName,
createdAt: feedback.createdAt,
conversationId: feedback.conversationId
id: feedback.id,
csatSurveyResponse: CsatResponse(
id:feedback.id,
conversationId: feedback.conversationId,
rating: request.rating,
feedbackMessage: request.feedbackMessage
),
inboxAvatarUrl: feedback.inboxAvatarUrl,
inboxName: feedback.inboxName,
createdAt: feedback.createdAt,
conversationId: feedback.conversationId
);
}
callbacks.onCsatSurveyResponseRecorded?.call(feedback);
16 changes: 0 additions & 16 deletions lib/ui/chatwoot_chat_dialog.dart
Original file line number Diff line number Diff line change
@@ -2,8 +2,6 @@ import 'package:chatwoot_sdk/data/local/entity/chatwoot_user.dart';
import 'package:chatwoot_sdk/ui/chatwoot_chat_theme.dart';
import 'package:chatwoot_sdk/ui/chatwoot_l10n.dart';
import 'package:flutter/material.dart';
import 'package:flutter_chat_ui/flutter_chat_ui.dart';
import 'package:intl/intl.dart';

import 'chatwoot_chat_page.dart';

@@ -22,8 +20,6 @@ class ChatwootChatDialog extends StatefulWidget {
Color? secondaryColor,
Color? backgroundColor,
ChatwootL10n? l10n,
DateFormat? timeFormat,
DateFormat? dateFormat,
Future<FileAttachment?> Function()? onAttachmentPressed,
Future<void> Function(String)? openFile
}) {
@@ -41,8 +37,6 @@ class ChatwootChatDialog extends StatefulWidget {
secondaryColor: secondaryColor,
backgroundColor: backgroundColor,
l10n: l10n,
timeFormat: timeFormat,
dateFormat: dateFormat,
onAttachmentPressed: onAttachmentPressed,
openFile: openFile,
);
@@ -88,12 +82,6 @@ class ChatwootChatDialog extends StatefulWidget {
/// See [ChatwootL10n]
final ChatwootL10n? l10n;

/// See [Chat.timeFormat]
final DateFormat? timeFormat;

/// See [Chat.dateFormat]
final DateFormat? dateFormat;

final Future<FileAttachment?> Function()? onAttachmentPressed;

final Future<void> Function(String)? openFile;
@@ -110,8 +98,6 @@ class ChatwootChatDialog extends StatefulWidget {
this.secondaryColor,
this.backgroundColor,
this.l10n,
this.timeFormat,
this.dateFormat,
this.onAttachmentPressed,
this.openFile
}) : super(key: key);
@@ -205,8 +191,6 @@ class _ChatwootChatDialogState extends State<ChatwootChatDialog> {
userIdentityValidationKey: widget.userIdentityValidationKey,
user: widget.user,
enablePersistence: widget.enablePersistence,
timeFormat: widget.timeFormat,
dateFormat: widget.dateFormat,
theme: ChatwootChatTheme(
primaryColor: widget.primaryColor ?? CHATWOOT_COLOR_PRIMARY,
secondaryColor: widget.secondaryColor ?? Colors.white,
8 changes: 0 additions & 8 deletions lib/ui/chatwoot_chat_page.dart
Original file line number Diff line number Diff line change
@@ -92,12 +92,6 @@ class ChatwootChat extends StatefulWidget {
/// See [ChatwootL10n]
final ChatwootL10n l10n;

/// See [Chat.timeFormat]
final DateFormat? timeFormat;

/// See [Chat.dateFormat]
final DateFormat? dateFormat;

///See [ChatwootCallbacks.onWelcome]
final void Function()? onWelcome;

@@ -164,8 +158,6 @@ class ChatwootChat extends StatefulWidget {
this.showUserNames = true,
this.theme,
this.l10n = const ChatwootL10n(),
this.timeFormat,
this.dateFormat,
this.onWelcome,
this.onPing,
this.onConfirmedSubscription,