Xelson well ,I have solve it,thanks!

Jishnu It's so annoying on mobile devices , will you please make something like instagram or fb

Use custom css

@media @phone {
    .NeonChatFrame.hidden {
        margin-bottom: 52px;
    }
}
    22 days later

    Hi ! thanks for this great extension !
    I've got a bug, I think since I updated to flarum 1.2.0. I can't post a message in chat anymore, it displays an error ! Am I alone in this case ?

    In console, i've got this error :
    https://xxxxx/api/chatmessages/0 [HTTP/2 405 Method Not Allowed 54ms]

      Note that I use dev-master version.
      I went in debug mode, this is the full debug log :

      POST https://www.xxxxxxxxxxxxxx.fr/api/chatmessages/0
      
      Flarum\Http\Exception\MethodNotAllowedException: POST in /vendor/flarum/core/src/Http/Middleware/ResolveRoute.php:60
      Stack trace:
      #0 /vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\ResolveRoute->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
      #1 /vendor/flarum/core/src/Http/Middleware/SetLocale.php(51): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
      #2 /vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\SetLocale->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
      #3 /vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(58): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
      #4 /vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\AuthenticateWithHeader->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
      #5 /vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(31): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
      #6 /vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\AuthenticateWithSession->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
      #7 /vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(52): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
      #8 /vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\RememberFromCookie->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
      #9 /vendor/flarum/core/src/Http/Middleware/StartSession.php(61): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
      #10 /vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\StartSession->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
      #11 /vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(29): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
      #12 /vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Api\Middleware\FakeHttpMethods->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
      #13 /vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(28): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
      #14 /vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\ParseJsonBody->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
      #15 /vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
      #16 /vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\HandleErrors->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
      #17 /vendor/flarum/core/src/Http/Middleware/InjectActorReference.php(25): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
      #18 /vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\InjectActorReference->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
      #19 /vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(76): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
      #20 /vendor/middlewares/request-handler/src/RequestHandler.php(84): Laminas\Stratigility\MiddlewarePipe->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
      #21 /vendor/laminas/laminas-stratigility/src/Next.php(51): Middlewares\RequestHandler->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
      #22 /vendor/middlewares/base-path-router/src/BasePathRouter.php(101): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
      #23 /vendor/laminas/laminas-stratigility/src/Next.php(51): Middlewares\BasePathRouter->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
      #24 /vendor/laminas/laminas-stratigility/src/Middleware/OriginalMessages.php(36): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
      #25 /vendor/laminas/laminas-stratigility/src/Next.php(51): Laminas\Stratigility\Middleware\OriginalMessages->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
      #26 /vendor/middlewares/base-path/src/BasePath.php(73): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
      #27 /vendor/laminas/laminas-stratigility/src/Next.php(51): Middlewares\BasePath->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
      #28 /vendor/flarum/core/src/Http/Middleware/ProcessIp.php(24): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
      #29 /vendor/laminas/laminas-stratigility/src/Next.php(51): Flarum\Http\Middleware\ProcessIp->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
      #30 /vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(76): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
      #31 /vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(65): Laminas\Stratigility\MiddlewarePipe->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\EmptyPipelineHandler))
      #32 /vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(96): Laminas\Stratigility\MiddlewarePipe->handle(Object(Laminas\Diactoros\ServerRequest))
      #33 /vendor/flarum/core/src/Http/Server.php(44): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
      #34 /public/index.php(26): Flarum\Http\Server->listen()
      #35 {main}

      and again breaking changes in minor update... This is already starting to annoy. Looking

        Xelson and again breaking changes in minor update...

        Yes, that's something which shouldn't happen. I'm curious if Flarum change something in extension areas or chat using some "hacks" which play with Flarum core areas.

          Wadera Flarum updates cannot change extension code. It looks like there were undocumented backend changes in the minor update but I can't be sure until I figure it out. Even the detailed log is not clear for me

          I just realized that the problem is not in the backend, but in the frontend that sending the request. There is a POST request specifying the model id, but in this case we are creating a model, so we do not need to specify the id so the correct request should be POST /api/chatmessages instead POST api/chatmessages/0

          1.1.3

          • Fix front-end API queries on Flarum 1.2 sylv38
          • Add minimize button in chat list in mobile view

          Update

          composer update xelson/flarum-ext-chat

          Install for development builds:

          composer require xelson/flarum-ext-chat:dev-master

          Thank you so much for the update! I can confirm it's all working perfectly at this end, great extension. One thing - I'd like to customise the pink colour, could you tell me where the code for this is located please? I'd just like it to sit with my forum a little cleaner.

          Many thanks.

            si_edgey You can use custom CSS on the admin panel for it (something like ice blue theme):

            .ChatHeader
            {
                background-color: #111 !important; /* chat header color */
            }
            
            .ChatList
            {
                background-color: #e1f4fd !important; /* chatlist background color */
            
                .header {
                    background-color: #649aff !important; /* chatlist header color */
                }
            
                .panel-preview
                {
                    &:hover:not(.active) {
                        box-shadow: 0 0 0 3px #94ddff !important; /* primary hover color #94ddff*/
                        @media @phone {
                            background-color: #94ddff !important;
                        }
            
                    }
            
                    &.active {
            
                        box-shadow: 0 0 0 3px #649aff !important; /* primary color #94ddff*/
                    }
                    .message .sender {
                            color: #94ddff !important;
                    }
                }
                .panel-add {
                    &:hover {
                        box-shadow: 0 0 0 3px #94ddff !important;
                    }
                }
            }

            1.1.4

            • New minimized view: circle button with unreaded messages indicator
            • Fix chat overlaping by the side pane on mobile #27

            I hurried with the release of the update. I shouldn't have displayed the chat on top of modal windows and sidebars. This violates their principles of focusing attention when making decisions by the user. In the next update, the chat will overlap with these windows as before.