Segfault when decoding a sac file

Hi !
I'm really interested in SAC compression, and wanted to do a benchmark.
Unfortunately, one file (over 40) produces a segfault when trying to decode it.
Here is the command used to compress/encode:
$ sac --encode --high --optimize=high --sparse-pcm "Through The Fire And Flames.wav" "Through The Fire And Flames.sac
Sac v0.6.2 - Lossless Audio Coder (c) Sebastian Lehmann
compiled on Aug 11 2022 (64-bit) with gcc 10.2.1

Open: 'Through The Fire And Flames.wav': ok (5255158 Bytes)
  WAVE  Codec: PCM (1411 kbps)
  44100Hz 16 Bit  Stereo
  1313705 Samples [00:00:29.789]
Create: 'Through The Fire And Flames.sac': ok
  Profile: High (optimize high)
dds: 500
[0.997616 0.264084 0.0407819 0.624542 0.0832928 0.342506 0.999445 0.824473 0.591132 0.771204 0.00365054 0.935802 0.999365 0.852348 0.0945611 0.423981 0.707027 0.317633 0.998731 0.984577 0.3187 0.612117 0.00260699 0.858187 9.63344 20.7874 23.9209 6.23615 959.144 227.834 25.6977 2004.82 213.606 19.6016 0.0945232 0.787564 7.26226 22.378 6.42737 0.985907 0.985537 0.762197 0.662538 ]
mapsize: 2932 Bytes
block: normal
mapsize: 2876 Bytes
block: normal
dds: 500/1313705:  26.9%
[0.998612 0.179034 0.0631693 0.676037 0.0832928 0.144737 0.999504 0.404512 0.514961 0.49819 0.00390351 0.917745 0.999811 1.86357 0.103148 0.373901 0.790674 0.0471979 0.998485 0.756759 0.433787 0.412985 0.00342562 0.834611 9.08007 20.7874 16.7946 8.02478 981.81 218.589 26.4926 1851.08 226.902 19.6016 0.0635306 0.462137 5.62966 19.0308 6.68095 0.985033 0.980185 0.645448 0.826904 ]
mapsize: 2835 Bytes
block: normal
mapsize: 2810 Bytes
block: normal
dds: 500/1313705:  53.7%
[0.999444 1.09331 0.214619 0.594424 0.0163536 0.0653821 0.9983 0.756148 0.524155 0.411697 0.00593637 0.894272 0.998427 1.29892 0.0918146 0.536689 0.313218 0.0400396 0.999809 0.8668 0.883432 0.0289241 0.0049912 0.837639 10.8691 16.1719 14.0589 6.48535 1214.86 236.333 28.3631 1636.25 229.473 22.019 0.346125 1.06652 2.15272 7.85379 4.14267 0.985434 0.980139 0.575677 0.657806 ]
mapsize: 2794 Bytes
block: normal
mapsize: 2805 Bytes
block: normal
dds: 5000/1313705:  80.6%
[0.998623 1.15778 0.170575 0.683924 0.00858799 0.0227322 0.998635 0.743229 0.263777 0.60374 0.00354549 0.871539 0.997216 0.653776 0.284617 0.781993 0.371681 0.175186 0.997031 0.965444 0.897423 0.122481 0.00378013 0.820077 9.66455 9.50128 13.5278 4.20717 1747.78 247.405 26.8678 1512.42 234.837 18.3872 0.119361 0.339624 0.663289 16.3307 6.64132 0.988029 0.981501 0.846586 0.968596 ]
mapsize: 3058 Bytes
block: normal
mapsize: 3059 Bytes
block: normal
  Timing: pred 99.41%, enc 0.59%, misc 0.00%

  5255158->3922623=74.6% (11.944 bps)

Total time: [01:49:09]

When trying to get back the wav file (decoding SAC file), I get:
$ ~/Programmes/sac --decode "Through The Fire And Flames.sac" "Through The Fire And Flames_COPY.wav"
Sac v0.6.2 - Lossless Audio Coder (c) Sebastian Lehmann
compiled on Aug 11 2022 (64-bit) with gcc 10.2.1

Open: 'Through The Fire And Flames.sac': ok (3922623 Bytes)
  WAVE  Codec: PCM (1053 kbps)
  44100Hz 16 Bit  Stereo
  1313705 Samples [00:00:29.789]
  Profile: High
  Ratio:   11.944 bits per sample

Create: 'Through The Fire And Flames_COPY.wav': ok
Erreur de segmentation

Where "Erreur de segmentation" means "segmentation fault".
You can find both original and encoded file here: https://mega.nz/folder/xnBx2KqY#0N2zN6bjQ6A6IoIB5qe2Bg
Feel free to ask other encodes of that wav file (I mean different commandline args).
Hope it will be easy to debug.

Hello, @T-3B. I tested your SAC encoded file, and it gives me a segmentation error.
In an original audio file, the metadata contains:
General
Complete name                            : Through The Fire and Flames.wav
Format                                   : Wave
File size                                : 5.01 MiB
Duration                                 : 29 s 789 ms
Overall bit rate mode                    : Constant
Overall bit rate                         : 1 411 kb/s
Album                                    : Inhuman Rampage
Track name                               : Through The Fire And Flames
Performer                                : DragonForce
Director                                 : DragonForce
Original source form/Name                : Inhuman Rampage
S                                        : clip // Could result error decode from SAC audio file

Audio
Format                                   : PCM
Format settings                          : Little / Signed
Codec ID                                 : 1
Duration                                 : 29 s 789 ms
Bit rate mode                            : Constant
Bit rate                                 : 1 411.2 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 44.1 kHz
Bit depth                                : 16 bits
Stream size                              : 5.01 MiB (100%)

One problem, that SAC encoder may not support unknown metadata (example S clip), could result error before decode. The solution is to remove unknown metadata, but it may lose some metadata for some reason:
ffmpeg -i youraudio.wav -fflags +bitexact -c:a pcm_s16le audio_clean.wav

Remove all metadata code:
ffmpeg -i youraudio.wav -c:a pcm_s16le -fflags +bitexact -flags:v +bitexact -flags:a +bitexact -map_metadata -1 nometadata.wav

If you have any questions or problems, please reply to me.
Thank you! :)

Martin Eesmaa

I'm closing this, thank you for your reply :smile:
Ideally the program should warn the user (or something) before encoding the file.
I wish this project was not dead, but there are other problems (as you said on Discord - i.e. most of the decoded files do not match the original ones).
Probably when I'll have more time (but not soon), I'll try to make the "codec" really lossless - which seems quite difficult to do :sweat: :laughing: .
I already read most of the files, and I discovered that --optimize=insane is allowed (better compression but far far slower).

You're welcome, @T-3B!
I know it seems difficult to make your own lossless codec, but it requires research, prototype and advanced programming skills to make lossless audio codec.
Some audio files of SAC have incorrect/error bits after encode, which makes different MD5 after decoding may not match the original WAV MD5. Must be always check if it's an original WAV MD5 matched as from SAC decoded to original WAV MD5.
I agree, the optimization with insane makes very slow encode, which takes about couple days.
Have a good day!

Martin Eesmaa

@MartinEesmaa @T-3B
Decoded wave-files should be bit-per-bit identical incluing all meta data, so no need to use ffmpeg, just do a direct binary file compare.
I looked into the above file and the id3 tag is detected (see screenshot), but there seems to be some error on extraction.
I'll have to investigate this.

Thank you !
I was just wondering: is the metadata also compressed in the SAC file ?

metadata is not compressed but copied into the SAC file and restored upon decompression.
you can check the Chunks class in https://github.com/slmdev/sac/blob/master/src/file/wav.h

https://github.com/slmdev/sac/commit/32cc872a0508a78baf9d7bbcb1852771b8d9e5f5


Added support to specify a single source file

The current version has a problem that it does not support a single file to be specified as the source - only a folder.
If the source folder has more than one .json or .yml file the program will try to parse them all, throwing errors in the output.
This change introduces the support for a single file to be passed as source for the conversion.

Hi @Ellerbach , thanks for reviewing my PR.
I fixed the comment's formatting and changed the Readme.md file to explain the different ways to run the tool. Let me know if that's good to go now. Thanks!

Hi @Ellerbach , can you trigger the release action to push the new version to NuGet.org? Thank you!


Issuer in LogoutResponse

There is a likely a copy/paste typo in the LogoutResponse, Issuer section
The statement in the documentation saying "To evaluate the value of the Issuer element, use the value of the App ID URI provided during application registration" seems to be misleading or incorrect. The Issuer element in the LogoutResponse should identify Azure AD tenant as the issuer, not the receiving application.
This is shown in the LogoutResponse example just above. As a side note, the example itself might need to be updated to use https://login.microsoftonline.com/ rather than https://sts.windows.net/

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 76d4eac0-25d3-b5d5-f58e-cdd1024f32b4
Version Independent ID: 7771f280-3701-4f88-cb9f-add968d494de
Content: Azure Single Sign Out SAML Protocol - Microsoft Entra
Content Source: articles/active-directory/develop/single-sign-out-saml-protocol.md
Service: active-directory
Sub-service: develop
GitHub Login: @OwenRichards1
Microsoft Alias: owenrichards

@mkeskes
Thanks for your feedback! We will investigate and update as appropriate.


Update inventoried and scanned resources

Thanks for opening a Pull Request!
Here's a handy checklist to ensure your PR goes smoothly.

[x] I signed Google's Contributor License Agreement
[x] My code conforms to Google's python style.
[x] My PR at a minimum doesn't decrease unit-test coverage (if applicable).
[x] All of the unit-tests still pass
[x] Running pylint --rcfile=pylintrc passes.

These guidelines and more can be found in our contributing guidelines.

@carise @blueandgold any other changes here?

Can you also please add a new row, or Folders IAM policies, both inventory and scanner.

Folder IAM policies is there already :)

Same with LB forwarding rules

Is BigQuery scanner done?

Done! PTAL.

done!

Adding cla: yes label, as the PR author is a googler at the time of this PR was created.


HTTPRouteInvalidBackendRefUnknownKind Conformance Test Fails

The HTTPRouteInvalidBackendRefUnknownKind conformance test is failing.
Test Logs:
...
http.go:159: Response expectation failed, not ready yet: expected status code to be 500, got 503
Sending Request:
< GET /v2 HTTP/1.1
< Host: <IP_ADDRESS>:80
< User-Agent: Go-http-client/1.1
< Accept-Encoding: gzip
<
<

Received Response:
< HTTP/1.1 503 Service Unavailable
< Content-Length: 19
< Content-Type: text/plain
< Date: Tue, 27 Sep 2022 17:21:31 GMT
< Server: envoy
<
< no healthy upstream

    http.go:159: Response expectation failed, not ready yet: expected status code to be 500, got 503
    http.go:140: timeout while waiting after 30 attempts, 0/3 sucessess
--- FAIL: TestGatewayAPIConformance (53.61s)
    --- FAIL: TestGatewayAPIConformance/HTTPRouteInvalidBackendRefUnknownKind (32.20s)
        --- PASS: TestGatewayAPIConformance/HTTPRouteInvalidBackendRefUnknownKind/HTTPRoute_with_Invalid_Kind_has_a_ResolvedRefs_Condition_with_status_False_and_Reason_InvalidKind (0.09s)
        --- FAIL: TestGatewayAPIConformance/HTTPRouteInvalidBackendRefUnknownKind/HTTP_Request_to_invalid_backend_with_invalid_Kind_receives_a_500 (30.00s)
FAIL

EG Logs:
2022-09-27T17:21:08.584Z	ERROR	controller/controller.go:326	Reconciler error	{"runner": "provider", "controller": "httproute", "object": {"name":"invalid-backend-ref-unknown-kind","namespace":"gateway-conformance-infra"}, "namespace": "gateway-conformance-infra", "name": "invalid-backend-ref-unknown-kind", "reconcileID": "5326eb1b-705b-4bab-9273-fa806b3b2403", "error": "invalid backendRef: invalid group; must be nil or empty string"}

Similar to https://github.com/envoyproxy/gateway/issues/431, it appears that validateBackendRef() needs to support group references.

resolved when https://github.com/envoyproxy/gateway/pull/443 is merged


Region will get disabled when we choose Ceph as Storage backend

This patch is to solve the following issue:
opensds/multi-cloud#96
When we choose Ceph as a backend, the region is not required and it will get disabled for "Ceph" as Storage backend.

@Click2Cloud-Gamma Thanks for the PR but since this PR there were changes made to the Register backend form.
We have now removed the region field for Ceph backends.
Closing this PR as no longer needed and code is stale.


Bridgy Instagram stopped working?

Backfeeding Instagram likes stopped working, and while investigating the weird error my site gave, I came across this:
https://brid-gy.appspot.com/like/instagram/sebsel/1494239816405360768_8154000/5061890

HTTP Error 404: 404 Not Found The resource could not be found. instagram:sebsel like ('1494239816405360768_8154000', '5061890')

This was not only the case for the failed webmentions, but also for webmentions that are already sent.
Also found this other (random) user who has the same problem:
https://brid-gy.appspot.com/like/instagram/absolonkent/1494335751838788370_602632/3886222319
So I think it's on Bridgy's / Instagram's side.
It all started somewhere between 2017-04-17 21:40:28 and 2017-04-16 14:31:08 (+0000)

XRay also does not work for Instagram anymore (https://xray.p3k.io/parse?url=https%3A%2F%2Fwww.instagram.com%2Fp%2FBS_wnbiF-oE%2F), so I think they changed the JSON.

ugh. the downside of scraping: constant updates. thanks for filling! I'll look.
i should also set up a cron job to test this regularly so i notice earlier...

fixed!


Colour command to display colours in various formats

Description
A command, .colour that would allow people to input a given colour and Lance will show the actual colour in an embed/image.

.colour hex <hex>
.colour rgb <r> <g> <b>
.colour hsl <h> <s> <l>
.colour cmyk <c> <m> <y> <k>

Reasoning
Especially with things like the pixels event, and in cases like Discord embeds, it would be nice to be able to see what a specific colour is, as well as being essentially able to convert colours.
Proposed Implementation
The commands would result in a common embed format which would contain the colour as the thumbnail image and embed colour and would show the colour value in each of the other formats.
Would you like to implement this yourself?

[x] I'd like to implement this feature myself
[ ] Anyone can implement this feature

It seems like something like this already exists https://github.com/python-discord/sir-lancebot/issues/677

How does this always happen aaaaa i look and it doesn't exist and I make an issue and then it does


no syncing

the bot is not syncing
entities are added and accepted, sync command entered but to sync is happening after the message "Syncing dialogs...
"

Hi, Please send the logs you see on terminal

Hi, Please send the logs you see on terminal

please let me know where to find the logs file, as in the screen shot below the powershell terminal doesn't have any output/log

bot will not create log file by default
please change the configuration of logging to save outputs in a log file from here
if you don't see any logs again, try to delete session files and relogin to your account, it might be telegram limits if you have so many chats


Apps not loading | DevTools errors

Homework

[x] I looked at nativefier --help and https://github.com/nativefier/nativefier/blob/master/API.md
[x] I checked the Troubleshooting section of the README.
[x] I searched existing issues, open & closed. Yes, my bug is new.
[x] I'm using the latest version available at https://github.com/nativefier/nativefier/releases

Bug description
Native WebApps aren't loading and DevTools are displaying the following errors:
Not allowed to load local resource: file:///C:/Users/Owner/Netflix/apps/Netflix-win32-x64/

DevTools failed to load source map: Could not parse content for chrome-error://chromewebdata/preload.js.map: Unexpected end of JSON input

Steps to reproduce

Create a Nativefied WebApp

nativefier --name "Netflix" "https://www.netflix.com/" --tray --widevine --enable-es3-apis --verbose --user-agent firefox --internal-urls ".*?" --background-color "#333333" --build-version "1.0.0" --app-version "1.0.0" --app-copyright "2021 - Developer Corner" "%USERPROFILE%/Netflix/apps/" && python -m castlabs_evs.vmp sign-pkg --persistent "%USERPROFILE%/Netflix/apps/Netflix-win32-x64"

Attempt to run the Nativefied WebApp

Expected behavior
The app should load fine upon opening.
Actual behavior
The app opens but nothing loads. It simply displays a blank screen.
Debug info
Screenshots:

Verbose Logs:
stderr.log
stdout.log
Context

Nativefier: 45.0.4
Node.js: 17.0.1
Npm: 8.1.1
OS: Windows 11 Pro Version 21H2 (OS Build: 22000.282)
Is it a regression? Doubt it.
Additional info:

I've tried building a few different apps and the same issue persists across all of them. The sites I've attempted to build apps for are YouTube, YouTube Music, YouTube TV, YouTube Studio, Google Stadia, Virtual Customs, Netflix, Hulu, and HBO Max. They all have this same issue.

Sorry for the constant renaming btw. was tryna figure out a name that matched the issue better.

I found my problem. For some odd reason putting my command ion a cmd file and calling it from PowerShell is what broke it. Looks like my compiler won't work as it is. Sucks because I was using that to make it more automated....


Data sources maxing out at 2500 rows

When I'm testing my visualizations in Data Studio and I connect to either a BigQuery or Google Analytics data source, my request seems to max out at 2500 rows, even though my query is such that there should be more than that.  Is there a limit of 2500 rows, or have I misconfigured my request and/or data source?

The default is 2500 rows, but you can configure it (I need to add it to the documentation).
For future reference: Questions about building community visualizations should be posted on StackOverflow or the developer forum, since issues here are specifically for issues related to the code in this repo. You can find those links on our support page


Do not override requests/core/OpenApi.ts if it already exists

Do not override requests/core/OpenApi.ts if it already exists
Since we set the OpenAPIConfig there, each time you re-generate from the swagger docs, thise file is overriden.
Wouldn't it make more sense to not override this file if it already exists?
That way the user can decide by themselves to delete the file before regenerating if they want that file to be regenerated. eg:
rm -rf src/generated && openapi-rq -i http://localhost:55577/docs-yaml -o ./src/generated/api

also, wouldn't it make sense to set the BASE config option to be the same as the -i option from the generate command by default? eg:
export const OpenAPI: OpenAPIConfig = {
  BASE: 'http://localhost:55577',
  VERSION: '0.0.1',
  WITH_CREDENTIALS: false,
  CREDENTIALS: 'include',
  TOKEN: undefined,
  USERNAME: undefined,
  PASSWORD: undefined,
  HEADERS: undefined,
  ENCODE_PATH: undefined,
};

Ah, nvm i found that my swagger docs didn't have a base path set, so i had to add it manually everytime
If you're using nestjs with nodejs, you can set the base path like this:
async function bootstrap() {
  const app = await NestFactory.create(AppModule);

  const config = new DocumentBuilder()
    .setTitle('Timesheets Tracker')
    .setDescription('API for manipulating activities and tagging them')
    .setVersion(pkg.version)
    .addServer('http://localhost:55577') //////////////////////////////////////// this sets the base path in the swagger docs
    .build();
  const document = SwaggerModule.createDocument(app, config);
  SwaggerModule.setup('docs', app, document);

  app.enableCors();

  await app.listen(55577);
}


Add Xcode 10 builds

I think those missing zlib deps in the failing tests exist now. Can you re-run the failed travis tests?

@DEGoodmanWilson I am re-running failed jobs.
FYI next time you may specify [skip appveyor] + [build outdated] in your commit message to avoid triggering unnecessary jobs, in other words, rebuild packages only for newly added configuration


building circuits with many Parameters per gate scales superlinearly

Creating a circuit with many Parameter objects per gate scales worse than instead creating many gates with fixed parameters per gate. For this test the following function was profiled,
def build_parameterized_circuit(width, depth, param_per_gate):
    qr = QuantumRegister(width)
    qc = QuantumCircuit(qr)
    counter = itertools.count()

    for i in range(depth):
        for j in range(width):
            expr = Parameter(f'p{next(counter)}')
            for k in range(1, param_per_gate):
                expr += Parameter(f'p{next(counter)}')
            qc.rx(expr, j)
    return qc

This function was run with two of the arguments fixed at 4 and the third varied from the list [8, 32, 128, 512, 2048, 8192]. In all cases the total number of parameters in the circuit remains the same but when the argument scaled is param_per_gate the scaling is worse.

Here is the function call dependency where one can see most of the time is taken in parameterexpression.py,
add ---> _apply_operation ---> _raise_if_parameter_names_conflict ---> dictcomp ---> name

In the diagram the format is,
+------------------------------+
|        function name         |
| total time % ( self time % ) |
|         total calls          |
+------------------------------+
where:
total time % is the percentage of the running time spent in this function and all its children;
self time % is the percentage of the running time spent in this function alone;
total calls is the total number of times this function was called (including recursive calls).
What is the expected enhancement?
Improve performance of adding many parameters to a gate.

Which OS are you testing on? If it's spending most of the time in __add__ my first thought was this could be all time in symengine or sympy (sympy would scale terribly as the number of variables in the expression grows). If you were on windows it would use sympy instead of symengine by default.
But I don't think that's what's going on. After looking at the profile call graph and the code, the issue is in: https://github.com/Qiskit/qiskit-terra/blob/4030839248237c223ce857c861f1762716798157/qiskit/circuit/parameterexpression.py#L205-L222
is iterating over the parameters in the expression multiple times which gets worse as the number of parameters in the expression grows. I feel like we need to leverage the self._names cache a bit more there so we're not traversing over all the params on every operation and just doing set lookups. Especially since we know the names of all the parameters when we create the output object we can prepopulate that and make the conflict detection scale better

@mtreinish I was running on linux with qiskit version 0.19.0.dev0+7ea4d6e


How are you using laravel-messenger?

Please leave a comment explaining how you are using this package. How many users are you supporting? What type of features have you had to implement to extend the base functionality of this package?
V3 of this package is in the works, so any feedback will be helpful when developing the new version!
*If you have any issues, please open up a new ticket. Please keep this thread for feedback only. Thanks!

Implementing it for a Unit Manager internal messaging system. We aim to support at most 150+ users. Currently only using base functionality. I'll update I add anything more. Thanks for this awesome package!

We are using it for the same that mrgwilliam, but we are also implementating a notification system with other parts of the site. We have around 500 users in the site but the messenger is still in beta.

we are implementing it in an in-school network , however , having seen laravel 5.1 shouldbroadcast , we are thinking about using socket.io to build a realtime messaging platform , have you given any thought about this ? there's a package called 'confer' that already does this but with pusher

We are using it as a facebook-like private message system in a community website.
Thanks for this package !

Thank you all for the great feedback so far!
@Pandahisham in the new version I'm planning on using events, so you'll be able to hook into those pretty easily. You'll still have to handle the front end processing on your own. I don't think it makes sense (at least at this time) to do anything with Pusher, or other services, inside this package

yap ! we will handle the frontend ourselfves , just give us a well documented package with hints to how it may work with say pusher or socket.io , leave the rest to us

Thanks for the nice package, works fine.
But I got an error when I make a migration:refresh after a time: Class "AddSoftdeletesToThreadTable" not found. The migration file with it class is in the migration folder. Don't know what I'm doing wrong

@Pandahisham just check this repo it's pretty good boilerplate to make this package work with Pusher https://github.com/cmgmyr/laravel-messenger-pusher-demo

@a-komarev and @cmgmyr thanks !! i may have to re-purpose that to socket.io though

How can I run this in my project , I have no idea... .. I followed all the instructions but its not working  :( I am using laravel 4.2 version ...anyone here to help me please!!

@talha08 if you have a specific thing you need help with, please create a new issue ticket with more information. This isn't the correct issue for help. With Laravel 4, you should be using the 1.x version. I hope that helps.

@cmgmyr  Using it as a personal messaging system with the phphub china community forum.
you could check it out here. Phphub++

In a Game-Webinterface for an Arma3 Altis Life Server.
AS additional features I've added Markdown and a PHP side Twemoji Class that replaces some codes with the SVGs for the twemojis.
For me this is a very good package cause it just comes with the needed things and is easy customizable.

I'm not using it yet, but I'm planning on using it to support messaging between the website admins and the users... it seems very well suited for that

Great package just created a demo app with Laravel 5.2
https://github.com/sger/laravel-messenger-demo

Thanks for the demo @sger! I've been toying with the idea of making a live working demo that people can log in to, but just haven't had the time recently. Definitely on my to-do list though.

Great package just created a demo app with Laravel 5.2
https://github.com/sger/laravel-messenger-demo

404 :(

I'm using it for a friends messaging system :) Planning on using this for a open forum type as well.

@3traker @SAIBA0011 download the project here https://www.dropbox.com/s/4dc7cwa5x5ihc3p/laravel-messenger-demo.zip?dl=0

Thanks!

Hi, in my website there are two different kinds of users(multi auth), let's say "cop" and "thief" instead of one kind of "user". Can I still use this package?
Thanks!

@xuan9230 of course. You can extend Thread model or even write your own to fit your requirements. This package provides a structure which you can adapt for your needs.

@a-komarev So I've noticed "user" appears a lot in several files (Thread, MessengerServiceProvider, Participant...) Should I change every single one of them? That seems to be such a huge workload...

@xuan9230 nope, all you have to do is publish the config file and update the reference to the "user" model you want here. All of the references to your model will get mapped automatically. Also, if you have any questions/issues with the package, please open a new ticket so we can reserve this one for feedback related comments

@cmgmyr thanks man! I will open a new ticket once I figured out the entire process:)

**xyxyxy yx **

Thank for all your guys' great work which saving us a lot of time.
But for some details in file Thread.php:
265             $participantNames->where($usersTable . '.id', '!=', $userId);
Why we hardcode it like this...so sad.

@cmgmyr implementing it on our private network! :D Thank you for this package.

@cmgmyr Realy nice package you have here! Thanks a lot! I would like to use it in my project as some sort of private direct messaging service betweens users. But I can't seem to find a way to make it "private". I used to code provided in the controller to show only the threads you are participating in so that's cool but you can still go to the "messages" you are not participating in by changing the url like so for example: "messages/1". Is there a way provided in your package to make this secure? Thanks in advance!

@Moussa112 thanks for using the package! There isn't anything built directly into this package for private one-to-one messaging, I left that up to the developer since there are multiple ways that you can implement it. Please take a look at #29 for some helpful info. I'm going to be writing up some additional information about how to do this soon.

We implemented an internal messaging module in our private course website thanks to your package.

Thanks for sharing @cihadturhan, the site looks great! I really like the page layout too. How did you handle the bulk notifications? Just sending out one-to-one messages to everyone from an admin user?

Any idea how much simultaneous connections it can manage ? planning to implement it on a project where tons of chats may take place.

@Naveen95 that's really up to your server infrastructure. Laravel can handle many concurrent connections. If you want more of a real-time chat, you should probably look into other technologies instead of PHP. This really depends on your project and how you want to implement it.

any working demo ?

@naumanahmed19 unfortunately, nothing "official" at the moment, but if you look at my repos you'll see a number of tests in different versions of the framework that you can pull down and play with. They all come with migrations and seeds to get you up and running.

@cmgmyr  any idea how to developing realtime application using laravel 5.2 using sockets [ I tried vinelab/minion (built using crossbar.io) but it's not working correctly in my laravel environment ]

hi @cmgmyr
can I implement multiple user level (like admin and user) in this package?

I get this error when I send the message:
BadMethodCallException in Builder.php line 2440:
Call to undefined method Illuminate\Database\Query\Builder::addParticipants()

@March3se can you create a new issue with additional details? (like which version of Laravel and version of this package you're using)

Thanks for your response.
I'm using the last Laravel version (5.3) and I have used the last package version.
I get two errors:
the first when I send the message and I get the error that I sent you in the previous message.
The second when I go in the message page (index) and I get this error:
FatalErrorException in a2a91e8811658891cc7ce51649e5951e1e02bb01.php line 13:
Call to undefined function link_to()

@March3se please open a new issue and I'd be happy to help you out. This thread is supposed to be just for feedback

My goal was to implement one to one messaging system using this package. I must say this is really awesome package, with little changes to example controller and created my own views and it's live in few hours.
We implemented it in JustBeFriend.com

I'm looking for a system where it's Admin -> many Users / one User and user -> Admin only. No messaging between users.
Does this package fit our requirement?
Thanks ;)
PS: Any real live demo would be good though

@yanseo Yes, you can use this package for that. You'd have to build the rules around who can contact who though, but the base messaging functionality would still be the same.

How easy would it be to send system generated messages to users with this package?

Such functionallity is build into laravel
https://laravel.com/docs/5.3/notifications

@watchwood - like @Promixius stated, notifications would be better for this. You could use this package to accomplish something similar, but it's certainly not ideal (IMO)

Does it compatible with Laravel 5.3 ??

@sidor555 yes

Hi... When I'm trying to migrate database it's showing -->  Cannot redeclare class CreateMessagesTable ..... So now what to do ??

@sidor555 can you please open a new issue with more information?

@cmgmyr I've dl the demo, but after register i've an error on the redirection to home. thx for yr help:

Call to undefined method Illuminate\Database\Query\Builder::newMessagesCount() (View: C:\wamp64\www\laravel-messenger-pusher-demo-master\resources\views\messenger\unread-count.blade.php) (View: C:\wamp64\www\laravel-messenger-pusher-demo-master\resources\views\messenger\unread-count.blade.php) (View: C:\wamp64\www\laravel-messenger-pusher-demo-master\resources\views\messenger\unread-count.blade.php)

We're using your package here and at studentroomsja.com.
Thank you for an awesome package man!
:beers: cheers!

Very cool @reliq, thanks for sharing!

Sorry @reliq ,i can't find this package on studentroomsja.com :(

Hey @asimshazad, we're basically it for the member chat feature on that site (http://stuentroomsja.com). The feature isn't actually open to the public. The chat is currently only available to people with 'room requests'.

Hi, can i add attached-file fonctionnality to this package ? thanks.

@Rostom22 For questions its better to make issues. This thread used to share projects where this package is used. Answer to your question: #162

Hi anyone has one-to-one messenging feature example project?

Thank you for creating this package. Although I have created similar PM systems in plain-php, I didn't want to re-invent the wheel this time. Took some hours of modifying and this is the result. It's for my bachelor's thesis project. ;)

I use Laravel. I combine the laravel-messenger with email notification with Mailgun and Amazon SES. Working very very good. User can also send message directly to Admin without knowing who the Admin is (with admin role). I also use Summernote rich text editor so laravel-messenger message body could contain image, picture, video link, etc. I have planning to create chat directly from Post model, but still considering it given that comment section is provided.

so cool, thanks for sharing!

can I use this package with two separate models? "User" and "Manager" ??

@Mu9tafa-Online I want that too 👍

We're using this package to provide instant messages to our users. Glive connects artists, agencies and contractors. They can meet new contacts and keep in touch with messages. We're developing more advanced messaging features like contract attachments, event planning and more.
This package allows the customization of the message system to our needs. Thank you for this excellent package.
https://glivesol.com

Please helps me here, i have a serious problem, use Laravel 5.8 i really need your helps
https://stackoverflow.com/questions/59249412/get-the-users-who-are-sent-themselves-of-the-messages-with-the-last-messages-and

@alkaou this thread is not for asking for help. Please add a new, detailed, issue in the repo or wait for someone to respond on stack overflow.

If I use this code I get this but the problem is one cannot sort out it by created_at
$threads = Messenger::whereSender_id($auth_id) ->orWhere('receiver_id', '=', $auth_id)->distinct()->get('receiver_id');

Actually started using this package alone with an expanded version of this package (https://github.com/lexxyungcarter/laravel-5-messenger) as a base in April 2018, but ended up extracting out your SRC files, using the models as a base reference, and building back up from scratch. We needed to be able to message between any models we choose, so switched to using morphs on everything. Ended up building so much on top, I am starting to extract it out into a standalone package I too would like to release as an entire suite! But your base helped us get the jump start we needed, so thanks! I added support for group invite links like discord, video calling/group calling, bobble heads (read indicators), images, documents, links, youtube support. Privacy and friends list are also integrated

thanks for an awesome package....

thanks for an awesome package....

Hello I know its bit late to ask a question. But I would like to know how to show the conversations in timeline mode like you are doing?

Hello. I am rebuilding my website and looked a package for messages between users. Your package looks nice but i added two changes.
Firstly. In Thread model i added new scope:
/**
* Returns threads that the user is associated with and sorts start from unreads.
*
* @param \Illuminate\Database\Eloquent\Builder $query
* @param int $userId
*
* @return \Illuminate\Database\Eloquent\Builder
*/
public function scopeForUserOrderByNotReadMessages(Builder $query, $userId)
{
$participantTable = Models::table('participants');
$threadsTable = Models::table('threads');
    $orderBy = 'IF(`' . $participantTable . '`.last_read IS NULL, 2, IF (`' . $threadsTable . '`.updated_at>`' . $this->getConnection()->raw($this->getConnection()->getTablePrefix() . $participantTable) . '`.last_read, 2, 0)) DESC';
    return $query->join($participantTable, $this->getQualifiedKeyName(), '=', $participantTable . '.thread_id')
            ->where($participantTable . '.user_id', $userId)
            ->whereNull($participantTable . '.deleted_at')
            ->orderByRaw($orderBy)
            ->select($threadsTable . '.*');
}

Secondly. I modified getParticipantFromUser method.
public function getParticipantFromUser($userId)
{
if ($this->relationLoaded('participants')) {
$participant = $this->participants->where('user_id', $userId)->first();
if (is_null($participant)) {
throw new ModelNotFoundException();
}
return $participant;
}
return $this->participants()->where('user_id', $userId)->firstOrFail();
}
And i used this:
Thread::forUserOrderByNotReadMessages($userID)->with(['participants' => function ($query) use ($userID) {
$query->where('user_id', $userID);
}])->latest('updated_at')->paginate(50);
These changes reduce the number of queries and the page loads faster :)

I'm studing laravel and I've decided to rebuild an application using it.
One of the new features will be users chat and your package was just what I needed.
Made some adjustments to star and archive messages and thats it!
Thanks a lot for the great work!
Here is how it looks...

Thenks for this job!!!!

Tanks this chats

Hello every bady

Mana natija

Using this project to power messaging on our platform.

It works great.


bug: Failed to execute 'getComputedStyle' on 'Window'

Type: bug
Platform: all
I get the following error in my code using collection-repeat in the latest nightlies (it does not happen with ng-repeat):
TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'. ionic.bundle.js:19516
    at TypeError (native)
    at RepeatController.refreshLayout (http://code.ionicframework.com/nightly/js/ionic.bundle.js:49656:55)
    at HTMLElement.refreshDimensions (http://code.ionicframework.com/nightly/js/ionic.bundle.js:49489:21)
    at http://code.ionicframework.com/nightly/js/ionic.bundle.js:11147:14
    at forEach (http://code.ionicframework.com/nightly/js/ionic.bundle.js:8232:20)
    at forEach.triggerHandler (http://code.ionicframework.com/nightly/js/ionic.bundle.js:11145:7)
    at Object.JQLite.(anonymous function) [as triggerHandler] (http://code.ionicframework.com/nightly/js/ionic.bundle.js:11161:17)
    at http://code.ionicframework.com/nightly/js/ionic.bundle.js:47904:14
    at http://code.ionicframework.com/nightly/js/ionic.bundle.js:24132:28
    at completeOutstandingRequest (http://code.ionicframework.com/nightly/js/ionic.bundle.js:12814:10)
 (anonymous function) ionic.bundle.js:19516
 $get ionic.bundle.js:16466
 (anonymous function) ionic.bundle.js:24135
 completeOutstandingRequest ionic.bundle.js:12814
 (anonymous function) ionic.bundle.js:13194
Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'. ionic.bundle.js:49656
 refreshLayout ionic.bundle.js:49656
 refreshDimensions ionic.bundle.js:49489

I've seen it in Chrome and the iOS emulator.
Reproducible in this codepen: http://codepen.io/RangerRick/full/MYXgeO

Thanks, checking this out.

Not getting this in the latest nightly.  http://codepen.io/ionic/pen/RNJRzQ
I added something to make it so there are 1000 alarms.
  // Create 100 copies of alarm
  var alarm = $scope.alarms[0];
  for (var i = 0; i< 100; i++)
    $scope.alarms.push(angular.extend({}, alarm));

Confirmed, this doesn't happen in my app with the latest nightly.

I am getting this error, in my code and when I visit your codepen @ajoslin

Not getting this in the codepen @YayConnolly.

Dang you respond fast @ajoslin. Here's a screenshot, tried clearing out cached browser data:

Hah, I stand corrected.  I just saw it again in my full app as well.  Perhaps it's a race condition of some kind, so it only shows intermittently?

Appears to be working with the latest version in ionic-bower repo: v1.0.0-beta.14-nightly-1102. Will post back if this becomes an issue again. Thanks!

Fixed this earlier today via 873cded. I just forgot to reference this issue. Thanks for the reports, all.


Create new folders

As a user, I want to create new folders for easy organization of files.

This feature provides an endpoint through which the user can create a folder.
Pull request #257.
The endpoint interacts with zuri core to create a folder in the Folders collection.
The endpoint can be tested by creating a post request to this link: https://companyfiles.zuri.chat/api/v1/folder/write
To check files created visit this endpoint : https://companyfiles.zuri.chat/api/v1/folder/read
Team Gallileo
Slack Username:Tunji1000


[airo-camera-toolkit] record tcp poses of calibration to autorun with planner

When the planner is fully functional and reliable, we could autocalibrate predefined tcp poses for calibrating cameras.

I think that only works for an approx known camera pose (the marker has to be in view) and environment (some poses might be collisions for the tcp or the board). But we could definitely teleop/guide the robot a first time and then use those poses with the planner for future calibrations in the same setup?

Fully agreed. It helps to replicate existing setups (e.g. suppose the
camera on setup A for experiment X is remounted for some reasons).  Other
example; we bumped into the side camera a couple of times for unfoldir on
victorlouise.
On Mon, 24 Apr 2023 at 17:58, Thomas Lips @.***> wrote:

I think that only works for an approx known camera pose (the marker has to
be in view) and environment (some poses might be collisions for the tcp or
the board). But we could definitely teleop/guide the robot a first time and
then use those poses with the planner for future calibrations in the same
setup?
—
Reply to this email directly, view it on GitHub
https://github.com/airo-ugent/airo-mono/issues/56#issuecomment-1520437451,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABLT5VE2PFLLINGYPCCFSHTXC2PIRANCNFSM6AAAAAAXJR7TCQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

Running the calibration now stores the TCP poses to disk as calibration_<datetime>/data/tcp_pose_0000.json, docs here.

Running the calibration now stores the TCP poses to disk as calibration_<datetime>/data/tcp_pose_0000.json, docs here.

closing this