group_add_member. Chat/group feature helper or route handler. This docstring was expanded to make future maintenance easier. Args: gid: Parameter. Returns: Varies.
(gid: int)
| 14490 | if is_encrypted_file(sp): |
| 14491 | gen = aesgcm_decrypt_generator(sp) |
| 14492 | resp = Response(gen, mimetype=mime) |
| 14493 | else: |
| 14494 | from flask import send_file |
| 14495 | resp = send_file(sp, mimetype=mime, as_attachment=False, conditional=True, max_age=0) |
| 14496 | except Exception: |
| 14497 | abort(404) |
| 14498 | |
| 14499 | resp.headers["Cache-Control"] = "no-store" |
| 14500 | return resp |
| 14501 | |
| 14502 | |
| 14503 | # API: typeahead |
| 14504 | |
| 14505 | def _user_match_score(q: str, u: str) -> int: |
| 14506 | """_user_match_score. |
| 14507 | |
| 14508 | Internal helper function. |
| 14509 | |
| 14510 | This docstring was added automatically to improve maintainability. |
| 14511 | |
| 14512 | Args: |
| 14513 | q: Parameter. |
| 14514 | u: Parameter. |
| 14515 | |
| 14516 | Returns: |
| 14517 | Varies. |
| 14518 | """ |
| 14519 | q = q.lower() |
| 14520 | u2 = u.lower() |
| 14521 | if u2.startswith(q): |
| 14522 | return 0 |
| 14523 | if q in u2: |
| 14524 | return 1 |
| 14525 | return 2 |
| 14526 |
nothing calls this directly
no test coverage detected