Skip to content

new.get.thread_id does not return thread id after google workspace change #814

@sieppl

Description

@sieppl

For unkown reasons in Google Workspace the legacy thread id is set, but the new one not:

Image

I suggest adding a fallback like this to the function:

api.new.get.thread_id = function() {
    const threadElem = document.querySelector("[data-thread-perm-id]");
    if (!threadElem) {
        return null;
    }
    
    const threadPermId = threadElem.dataset["threadPermId"];
    
    // Fall back to legacy thread ID if perm ID is undefined or the string "undefined"
    if (!threadPermId || threadPermId === "undefined") {
        return threadElem.dataset["legacyThreadId"] || null;
    }
    
    return threadPermId;
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions