filterAttachments function

Filtering attachments by type

Filtering attachments by type

filterAttachments(attachments, type)

Arguments

  • attachments: List of attachments

  • type: type field may have the following values:

    • photo - photo from an album;
    • posted_photo - photo uploaded directly from user's computer;
    • video - video;
    • audio - audio;
    • doc - document;
    • graffiti - graffiti;
    • url - web page URL;
    • note - note;
    • app - image uploaded with a third party application;
    • poll - poll;
    • page - wiki page.
  • Maintainer: Dmitriy Sorokin
  • License: GPL-3
  • Last published: 2020-09-29