- All notable changes to
Messenger
will be documented in this file.
MessengerBots::MATCH_ANY
match method.- When using
MATCH_ANY
, triggers are ignored and a handler will be handled for any message sent.
- When using
BotHandlerResolverService
to handle resolving / validatingBotAction
data for storing/updating.BotAction::formatTriggers()
helper, logic relocated fromMessengerBots
.BotActionHandlerDTO
,ResolvedBotHandlerDTO
, andMessengerProviderDTO
to structure internal data arrays.MessengerBots::getHandlersDTO()
returns a collection or single instance ofBotActionHandlerDTO
.
BotActionHandledEvent
trigger
property can now bestring|null
.MessengerBots::getHandlerSettings()
deprecated. UsegetHandlersDTO
.MessengerBots::getAuthorizedHandlers()
now returns a collection ofBotActionHandlerDTO
instances.
MessengerBots::resolveHandlerData()
method.
BroadcastFailedEvent
will be dispatched when a broadcast fails and throws an exception.
- Relocated knock cache methods to the
Thread
model fromSendKnock
action class. - Various code improvements.
- Caching on
BotAction
collection for a group thread when jobs process matching bot triggers against messages sent.
- All bot action classes will clear the
BotAction
cache. - Enforce checking child to parent relation keys in policies.
- All route model bindings are now scoped.
- Job class properties now have
public
visibility.
- Caching to a
Messages
'sreplyTo
relation. - Updating or archiving a message will reset the
replyTo
cache key.
- Moved cache methods and keys to model helpers.
Bot
name method now useshtmlspecialchars
.
CallHeartbeat.php
action class.
- Constants on
MessengerBots
class for all bot matching methods. getParsedMessage
andgetParsedWords
helpers onBotActionHandler
|ActionHandler
.php artisan messenger:make:bot {name}
command.body
state helper onMessageFactory
.
- Renamed
setDataForMessage
tosetDataForHandler
onBotActionHandler
|ActionHandler
. - Implemented helpers on the
BotAction.php
model for triggers and match method that take into account a handler classes overrides before using what is stored in the database.
- Caching for a participants last seen message.
thread_verifications
config section which defines whether friendship checks are enabled when creating a private thread or adding participants to a group thread.
'thread_verifications' => [
'private_thread_friendship' => env('MESSENGER_VERIFY_PRIVATE_THREAD_FRIENDSHIP', true),
'group_thread_friendship' => env('MESSENGER_VERIFY_GROUP_THREAD_FRIENDSHIP', true),
],
- Various code improvements and bug fixes.
- Video message upload support
Message::VIDEO_MESSAGE | type 4
.StoreVideoMessage
action.video()
method toMessengerComposer
messenger:purge:videos
command and accompanying job/action.- Private threads can be created using a video message.
assets
prefix on our asset route names (not paths).- Eager loading of message reactions for message collections.
- This update is backwards compatible, however, video messages will be disabled by default until you add the new nested values to your published
messenger.php
configsfiles
array.
'files' => [
// Add new message_videos
'message_videos' => [
'upload' => env('MESSENGER_MESSAGE_VIDEO_UPLOAD', true),
'size_limit' => env('MESSENGER_MESSAGE_VIDEO_SIZE_LIMIT', 15360),
'mime_types' => env('MESSENGER_MESSAGE_VIDEO_MIME_TYPES', 'avi,mp4,ogv,webm,3gp,3g2,wmv,mov'),
],
],
MessengerComposer
will now emit events/broadcast when a new thread is created. The new thread will also now be marked as pending if the two providers are not friends.storage.threads.disk
config default changed topublic
frommessenger
.- Deprecated
getProviderOnlineStatusVerbose
from ourMessengerProvider
interface. - Moved
shouldUseUuids
static method fromMessengerBots
toMessenger
class. - CS fixer updates.
FriendRemovedBroadcast
when a friend is removed.withoutEvents
boolean flag onMessengerComposer::silent(bool $withoutEvents = false)
to disable both broadcast and events for an action.
AuthenticateOptional::class
|auth.optional
middleware deprecated.Invite
model'scode
increased to 10 characters in length on creation.- Code cleanup / typo fixes.
- New constants on
Thread
,Participant
,Message
, andCall
models. - New constants on
FriendDriver
andMessengerProvider
interfaces. - New constants on
FileService
.
Definitions
support class has been deprecated.- All constants from
Definitions
have been moved to their respective model/interface.
NullFriendBroker
stand-in class forFriendDriver
.setFriendDriver
method on our coreMessenger
service.AttachMessengersCommand
to attach our messenger models with existing records.
- New
scoped
implementation for setting/unsetting theMessengerProvider
. MethodssetScopedProvider()
andunsetScopedProvider()
.- A scoped provider will keep any prior provider set in memory, such as an authenticated user, while returning the scoped provider to any subsequent calls to
getProvider()
. - When unsetting a scoped provider, it will set the prior provider back to the active provider, if one was set.
- This is mostly used internally, and on our
MessengerComposer
class, to avoid conflicts on queues as ourMessenger
service is a singleton.
- A scoped provider will keep any prior provider set in memory, such as an authenticated user, while returning the scoped provider to any subsequent calls to
- Interfaces
Ownerable
,HasPresenceChannel
for use with internal models and broadcasting.
- Our broadcaster and push notification service will now reset their states after execution.
- When broadcasting, we now enforce unique channels, filtering any duplicates before firing any broadcast.
- Updated policy allow/deny responses.
- Unsetting the
MessengerProvider
will now flush any activeFriendDriver
from the container. - Various bug fixes and request lifecycle improvements.
- Fixed
ThreadArchivedMessage
to not broadcast the system message, as participants would have already received the archived broadcast. - Updated policy allow/deny responses.
messenger:install
command will now ask for confirmation, and has the ability to overwrite our published config file, settingprovider_uuids
to true, using the--uuids
flag. It will also ask if you want to migrate after publishing.- General code improvements.
flush()
method onMessenger
andMessengerBots
.BaseMessengerJob
all job classes now extend.FlushMessengerServices
job middleware which flushes messenger and bot services. This fixes/prevents a queue worker's process from having one job alter our singleton's state, impacting a following job that calls to our singleton.
setVideoDriver
andsetBroadcastDriver
fixed to usebind
and notsingleton
.- Our
NullVideoBroker
will be set as our defaultVideoDriver
. ProcessMessageTriggers
properly flushes the active handler on our bots service between each match.
- Removed deprecated
ViewPortalController
as it now resides in our UI addon package. (182a37a)
- Improved docs. (9f6ab30)
messengerComposer()
helper. (13b4d9d)getUniqueHandlerClasses
toMessengerBots
.validUniqueActions
relationship on theBot
model.- Expanded docs.
- When viewing
add-handlers
for a bot, we now filter out handlers marked as unique that are already attached to the bot. (d643df3)
threads.subject
andbots.name
columns locked to max length of255
.Thread
subject
validation now allows min length of 2 and max length of255
.Message
temporary_id
post value set to max length of255
.- Commit (0b96afd)
JanusServer
andVideoRoomService
.janus
config file.JanusBroker
video driver.- Commit (4ced3a9)
- If you were already using our provided janus, you must now create and register your own JanusBroker
- Install our new janus-client package and update your broker accordingly to use the packages create/destroy for
VideoRoom
.
messages.body
andmessage_edits.body
columns to allow nullable. (2ebe8ac)EmojiInterface
,BotMatchingService
,MessageTransformer
, andMessengerComposer
now allow null for message body.
- Event subscribers will now always be registered, but conditionally check whether to handle events triggered. (avoids being disabled from config and not enabling dynamically when they were not registered in our service provider). (692256b)
- Using core php method
is_subclass_of
instead of my custom reflection checks. (303e12d) - Calls down command now re-sets the down cache lock when triggered while calls already down. (44b768a)
ProvidersCacheCommand
andProvidersClearCommand
Searchable
contract.checkImplementsInterface
andcheckIsSubclassOf
fromHelpers
class.- Commit (a4866a0)
getProviderSettings
public static method to theMessengerProvider
contract.getProviderSettings
default added to theMessageable
trait.MessengerServiceProvider
stub we now publish to the end users project. We also insert the provider to theapp.php
providers array.
- Messenger
getAllMessengerProviders
renamed togetAllProviders
. - Messenger
setMessengerProviders
renamed toregisterProviders
. - MessengerBots
setHandlers
renamed toregisterHandlers
.setHandlers
kept but deprecated. - Messenger
getConfig
no longer returns providers. - Provider interactions reversed. Now you set the classes you do not want the provider to interact with.
messenger:publish
command renamed tomessenger:install
.
providers
array from config.getFriendableForCurrentProvider
from Messenger.ProvidersCacheCommand
andProvidersClearCommand
deprecated. Providers caching removed from MessengerConfig.Searchable
contract deprecated.ProvidersVerification.php
class.
message_size_limit
to our config. (bb87b51)isGroupAdmin
property to theBotActionHandler
. (1f6f51b)
- Implemented
message_size_limit
to any message send or edit message request. - Forward
isGroupAdmin
from event -> process triggers toBotActionHandler
. Interface updated.
getFirstValidEmojiShortcode
method to the Emoji interface. (cc28e63)emitTyping
,emitStopTyping
,emitRead
, andread
methods toMessengerComposer
. (36ccbcf)- PresenceEvents class to handle getting/setting client presence events.
- Improve (reduced) queries for message reactions. (189b1cf)
- Methods for checking reflection moved from trait to helper class as static methods. (c06f299 & 1b5ee7d)
ChecksReflection
trait.setAction
,setThread
,setMessage
methods fromBotActionHandler
. Replaced withsetDataForMessage
. (4a5acdf)
BotActionHandledEvent
andBotActionFailedEvent
. (d5ab76c)Bots
api documentation.
- Add index to column
bot_actions.handler
- Moved logic for executing action handlers to
ProcessMessageTrigger
action class, and using new query. (39664d6) - When a bot handler fails / throws exception, the exception will not be reported. The action and exception will be dispatched
in the new
BotActionFailedEvent
that can be listened to by the end user. - Fixed bot and bot action cooldowns to cast as integer.
- MessengerComposer class and facade. Easily build to/from and message/image/document/audio/reaction/knock.
composer()
method to the core BotActionHandler
- Bug fix for bots when end user providers using INT keys and not UUIDs. Bot primary key now matches end
users messenger config
provider_uuids
. (9c3ae1a) - Improved query performance for scopes providers. (f093d23)
concatBuilder
from ScopesProviders trait.
- System messages for bot events (create, delete, avatar, rename).
- Proper store and destroy group thread avatar.
avatars
anddefault_thread_avatar
infiles
config array.- New methods for avatars (provider, thread, bot)
- Please see config: messenger.php
- Janus server bug fixes with improper types properties when http call fails.
- Avatars (provider, thread, bot) share one config for size/mimes.
- Switched main queries used for locating threads/calls from using
whereHas
to custom scope usingjoin
.
- Random of 5 default group thread avatars. Only one set now.
thread_avatars
provider_avatars
default_thread_avatars
fromfiles
config array.- Following methods from Messenger:
getThreadAvatarSizeLimit
setThreadAvatarSizeLimit
getThreadAvatarMimeTypes
setThreadAvatarMimeTypes
isProviderAvatarRemovalEnabled
setProviderAvatarRemoval
getProviderAvatarSizeLimit
setProviderAvatarSizeLimit
getProviderAvatarMimeTypes
setProviderAvatarMimeTypes
assets
config array under therouting
config section.assets.php
routing file.senderIp
toNewMessageEvent
. Forward IP to bot handlers.
- Assets (avatars/images/documents) no longer require authorization.
- Removed the bool parameter for api on the method
getProviderAvatarRoute()
from theMessengerProvider
contract.
- Assets, views, web routes. Relocated to Messenger UI addon.
- All API prefixed routes and responses for assets (images, documents, audio, avatars).
site_name
from config.web
fromrouting
config.provider_avatar
fromrouting
config.getSiteName()
getWebEndpoint()
isWebRoutesEnabled()
andgetSocketEndpoint()
methods from Messenger.
- Group thread bots feature!
Bot
andBotAction
models.bots
config arraydefault_bot_avatar
to files config array.- Migrations for
bots
andbot_actions
. MessengerBots
facade.- Default bot avatar in published images.
- global helpers for
broadcaster()
andbots()
. messenger:purge:bots
command.
- Thread
activeCall
relationship to using properofMany
query. messenger:providers:cache
command caches providers with the merged bot provider.- Switched injecting cache manager and config repository to using facade/helpers.
- See above for
messenger.php
config changes. - upgraded UI packages, edited views, and recompiled assets.
SystemFeaturesResource
implementation changed to using a direct call to the messenger service class.- When saving a group threads settings or updating a participants permissions, feature disabled values will be ignored.
SystemFeaturesResource
json resource.
- Event subscribers for calling and system messages. More config for these to toggle on or off, set queued, and queue channel.
- Config option to toggle system messages on or off.
- boolean column
chat_bots
onthreads
table. - boolean column
manage_bots
onparticipants
table. SystemFeaturesResource
attached to threads collection and thread resource. Shows the current system feature statuses.- Groundwork for upcoming bots feature.
- Default broadcast driver set in the service provider.
push_notifications
in config no longer nested array.
- Drivers section from config.
- ALL queued listeners and the Event => Listener map.
getBroadcastDriver()
andgetVideoDriver()
methods from messenger.
- Any models using
protected $dates
were switched to using cast fordatetime
- Storing invite now accepts null or any valid timestamp more than 5 minutes in the future, for the
expires
time.
- Using new
latestOfMany
eloquent call to gather the latest message for each thread in eager loads.
- composer.json now locked to laravel ^8.42
- Rename relation on thread
recentMessage
tolatestMessage
- staudenmeir/eloquent-eager-limit dependency.
- Fine tuned MessageTransformer. Bug fixes on some sentences.
- Renamed ALL methods on the MessengerProvider contract and matching trait to avoid future conflicts with other laravel packages / implementations.
name()
togetProviderName()
getAvatarColumn()
togetProviderAvatarColumn()
getLastActiveColumn()
togetProviderLastActiveColumn()
getAvatarRoute()
togetProviderAvatarRoute()
getRoute()
togetProviderProfileRoute()
onlineStatus()
togetProviderOnlineStatus()
onlineStatusVerbose()
togetProviderOnlineStatusVerbose()
- MessageTransformer support class to generate and transform message body.
- Bugfix in JS where failed message image loaded improper not found image.
- Yarn upgrade. Assets recompiled.
- Message transformer methods from MessageResource class.
.svg
as a valid default image mime allowed for upload.
- FileService now resets properties after each
upload
,destroy
anddestroyDirectory
.
getName()
method removed from FileService.upload()
method returns final file name now.
- Support for morph maps on polymorphic relations for providers.
- All instances of
get_class()
replaced with$model->getMorphClass()
.
getProviderId()
andgetProviderClass()
methods removed from Messenger.
- StoreMessengerIp listener removed. Up to end user to attach listener to heartbeat event should they want to use the IP provided.
instance()
method on messenger singleton renamed togetInstance()
- General major refactoring.
- bool column
embeds
and nullable/text columnextra
onmessages
table. - Optional extra payload when sending messages to allow custom json to be stored with the message.
- More extensive model factories.
- New routes for viewing group avatar when joining with an invitation.
- Renamed action class UpdateMessage to EditMessage.
- Ignore call option. When ignoring a private call, it will also end the call.
- Either party in a private call can end the call.
- Message reactions feature. New table
message_reactions
. - Events/broadcast for reactions feature.
- bool
edited
andreacted
columns on messages table. - New providers scope using concat() on polymorph keys.
- Custom rule to verify an emoji exist in string.
- Message edits go by bool
edited
and notupdated_at
column now. - Emoji converter is now an interface/service.
- New emoji picker added to the included UI.
- Emoji converter is now a service/interface.
- Message replies.
- reply_to_id column on the messages table.
- All store message actions accept params as array now instead of individual params.
- Audio message type to upload audio files. ~ Configs for audio files.
- Command to purge archived audio files.
- Routes to store/view/paginate and stream/download audio files.
- Updated the UI to include support for audio files in a thread.
message_documents.download
toggle in config removed.
- New configs to set mime types allowed to upload on each file type.
- threads, messages, participants and message_edits tables use precision 6 for timestamps now.
- Allow more mime types on uploads, frontend assets updated with this as well.
- Misc bug fixes along with image service not resizing gif/svg/webp.
- New configs to set upload limit sizes.
- New commands to temporarily shutdown calling system and end all active calls, as well as put the system back online.
- More file moves/renames.
- Set broadcast/video driver on demand.
- helpers.php methods except messenger().
- New Helpers class and support directory. Moved files around.
- Added intermediate modal to confirm joining call once page loads.
- Bugfix on join call skipping generating participant resource on response.
- Broadcast broker resets private/presence each time to method called.
- StoreEditMessage listener.
- Edit message action will store the edit history immediately after update message.
- Put a primary key back onto messenger model and table messengers.
- New Exceptions.
- Exceptions thrown throughout out package.
- Moved some authorization logic done in controllers or model into actions.
- Edit message table to store edit history.
- Route to view edit history.
- Config option to disable both edit message and viewing edit history.
- Edit message feature.
teardown_complete
added to calls table used to avoid duplicate tear downs. Added a short cache lockout upon ending a call to avoid race conditions with automated EndCallIfEmpty job.
- To avoid conflicts with channel names across apps, our channels are now prefixed with
messenger.
All impacted test and frontend assets have been updated to reflect this change.
- Test.
- Everything.