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

[E] Check user existence before sending message #1883

Closed
wants to merge 1 commit into from
Closed

[E] Check user existence before sending message #1883

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Apr 12, 2021

Message System Improvements

  • Treat the parameter "to" as an integer.
  • If the value of parameter "to" is negative then convert it to positive.
  • Ignore the message if the guid with the specified number in the parameter "to" does not exist.
  • If the parameter "message" is array then implode its contents using space.

##Message System Improvements
- Treat the parameter "to" as an integer.
- If the value of parameter "to" is negative then convert it to positive.
- Ignore the message if the guid with the specified number in the parameter "to" does not exist.
- If the paramter "message" is array then implode its contents using space.
@lianglee
Copy link
Member

@l3afblow3r there are several things which is not a valid,

  1. Why message is to be array? why dev will supply array as its known its should be string?
  2. Why the guid will be negative? So you mean if it is string you get an PHP warning? never happened till now but what version of PHP are you running?

Regarding ossn_user_by_guid() this is a valid and i think should be included!

@ghost
Copy link
Author

ghost commented Apr 12, 2021

Why message is to be array? why dev will supply array as its known its should be string?

The message is not array by default, but it is possible to specify it by appending [] to the parameter name.
This can either be achieved by a proxy or by manually modifying the name attribute through Dev Tools.

Why the guid will be negative? So you mean if it is string you get an PHP warning?

The guid does not have to be negative, we are talking about the to parameter,
we're just making a fallback to a positive number, just to make sure the page
doesn't spit out some errors for something that was avoidable.

@lianglee lianglee changed the title OssnMessages Improvements [E] Check user existence before sending message Apr 16, 2021
@lianglee
Copy link
Member

3b4a517

@lianglee lianglee closed this Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant